Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7faa4cd12598db7d59564e3dc9a0913c > files > 161

vips-7.18.2-1mdv2010.0.i586.rpm

<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->

<html>
<head>
<title>IM_COL_XYZ2RGB(3) manual page</title>
</head>
<body bgcolor='white'>
<a href='#toc'>Table of Contents</a><p>

<h2><a name='sect0' href='#toc0'>Name</a></h2>
im_col_Lab2LCh, im_col_LCh2ab, im_col_Lab2XYZ, im_col_XYZ2Lab, im_col_pythagoras,
im_col_display, im_col_XYZ2rgb, im_col_rgb2XYZ, im_col_L2Lucs, im_col_Lucs2L,
im_col_C2Cucs, im_col_Cucs2C, im_col_Ch2hucs, im_col_Chucs2h, im_col_make_tables_UCS,
im_col_dECMC - colour space conversion 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
#include &lt;vips/vips.h&gt; 
<p> 
<p> int
im_col_ab2Ch( a, b, C, h ) <br>
float a, b, *C, *h; 
<p> 
<p> int im_col_Ch2ab( C, h, a, b ) <br>
float C, h, *a, *b; 
<p> int im_col_Lab2XYZ( L, a, b, X, Y, Z ) <br>
float L, a, b, *X, *Y, *Z; 
<p> int im_col_XYZ2Lab( X, Y, Z, L, a, b ) <br>
float X, Y, Z, *L, *a, *b; 
<p> float im_col_pythagoras( L1, a1, b1, L2, a2,
b2 ) <br>
float L1, a1, b1, L2, a2, b2; 
<p> extern struct im_col_display *im_col_displays[];

<p> struct im_col_tab_disp *im_col_make_tables_RGB( im, display ) <br>
IMAGE *im; <br>
struct im_col_display *display; 
<p> int im_col_XYZ2rgb( display, table, X,
Y, Z, r, g, b, oflow ) <br>
struct im_col_display *display; <br>
struct im_col_tab_disp *table; <br>
float X, Y, Z; <br>
int *r, *g, *b; <br>
int *oflow; 
<p> 
<p> int im_col_rgb2XYZ( display, table, r, g, b, X, Y, Z ) <br>
struct im_col_display *display; <br>
struct im_col_tab_disp *table; <br>
int r, g, b; <br>
float *X, *Y, *Z; 
<p> float im_col_L2Lucs( L ) <br>
float L; 
<p> float im_col_Lucs2L( Lucs ) <br>
float Lucs; 
<p> float im_col_C2Cucs( C ) <br>
float C; 
<p> float im_col_Cucs2C( Cucs ) <br>
float Cucs; 
<p> float im_col_Ch2hucs( C, h ) <br>
float h, C; 
<p> float im_col_Chucs2h( C, hucs ) <br>
float hucs, C; 
<p> void im_col_make_tables_UCS( void ) 
<p> float im_col_dECMC(
L1, a1, b1, L2, a2, b2 ) <br>
float L1, a1, b1, L2, a2, b2; 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
Colour space conversion. These
functions convert colour values between four different formats: XYZ  (float),
Lab (float), UCS (float), and RGB (unsigned char) displayable. Additionally,
functions are provided to move from (a,b)-style rectangular colour coordinates
to (C,h)-style coordinates. h is always in degrees. 
<p> UCS is a colour space
derived from the CMC(1:1) equations. There is no easy analytical conversion
from UCS to Lab, so look-up tables are used. These have to be built with
a call to im_col_make_tables_UCS(). Once built, these tables are shared
by all UCS functions. You may call im_col_make_tables_UCS() many times -
tables are only built on the first call. 
<p> im_col_pythagoras() returns the
pythagoran distance between two points in a colour space. It can be used
for finding CIELAB delta E&rsquo;s. im_col_dECMC() returns the colour difference
between two LAB points in CMC(1:1). 
<p> An im_col_display structure characterises
a CRT screen (see &lt;vips/colour.h&gt;).  You can make up your own (if you can find
a TV analyser), or use one of the structures provied by VIPS in the NULL-terminated
array im_col_displays[]. See the source for <a href='disp2XYZ.1.html'>disp2XYZ(1)</a>
 for ideas on extracting
a display struct from this list. 
<p> <a href='im_make_tables_RGB.3.html'>im_make_tables_RGB(3)</a>
 has a display type
as argument, and returns a pointer to the structure im_col_tab_RGB. This
latter contains the matrices to go from XYZ to luminances (and back), and
the tables to go from the luminances (in r, g, b) to the effective signal
values to be applied to the monitor input (and back). The function returns
NULL on error. The IMAGE argument is passed on to im_malloc() to make the
space required for the tables. Pass either NULL (if you need to free the
memory yourself) or an IMAGE descriptor (if you want the memory to be freed
automatically when that descriptor is closed). 
<p> im_col_XYZ2rgb() takes a
display, a look-up table and an XYZ coordinate are returns three values
in the range 0-255. The extra value oflow is set to 0 if the specified XYZ
position aflls within the display gamut, and to 1 if the point lies outside
the gamut. im_col_rgb2XYZ() is the reverse transformation. 
<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
The
functions (usually) return 0 on success and -1 on error. 
<h2><a name='sect4' href='#toc4'>See&nbsp;Also</a></h2>
<br>
<pre>im_XYZ2disp(3), im_dE_fromdisp(3).
CopyrightNational Gallery, 1990-1993. AuthorD. Saunders - 1988 
J.Ph. Laurent - 2/12/1992 
J.Cupitt - 21/7/93