<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>IM_XYZ2disp(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_XYZ2disp, im_disp2XYZ, im_Lab2XYZ, im_XYZ2Lab, im_XYZ2Yxy, im_Yxy2XYZ, im_XYZ2sRGB, im_sRGB2XYZ, im_Lab2LCh, im_LCh2Lab, im_LCh2UCS, im_UCS2LCh - convert images between various colour spaces <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> #include <vips/vips.h> <p> int im_XYZ2disp(in, out, display) <br> IMAGE *in, *out; <br> struct im_col_display *display; <p> int im_disp2XYZ(in, out, display) <br> IMAGE *in, *out; <br> struct im_col_display *display; <p> int im_Lab2XYZ(in, out) <br> IMAGE *in, *out; <p> int im_XYZ2Lab(in, out) <br> IMAGE *in, *out; <p> int im_XYZ2Yxy(in, out) <br> IMAGE *in, *out; <p> int im_Yxy2XYZ(in, out) <br> IMAGE *in, *out; <p> int im_XYZ2sRGB(in, out) <br> IMAGE *in, *out; <p> int im_sRGB2XYZ(in, out) <br> IMAGE *in, *out; <p> int im_Lab2LCh(in, out) <br> IMAGE *in, *out; <p> int im_LCh2Lab(in, out) <br> IMAGE *in, *out; <p> int im_LCh2UCS(in, out) <br> IMAGE *in, *out; <p> int im_UCS2LCh(in, out) <br> IMAGE *in, *out; <p> <h2><a name='sect2' href='#toc2'>Description</a></h2> Functions to convert images between the different colour spaces supported by VIPS: RGB, sRGB, XYZ, Yxy, Lab, LCh and UCS. RGB and sRGB are three band uchar files. XYZ, Lab, LCh and UCS are three band float files. <p> These are the basic conversion routines provided by VIPS. Other conversions, such as <a href='im_Lab2disp.3.html'>im_Lab2disp(3)</a> , are built by composing these functions and are provided as a convenience to the programmer. <p> The VIPS colour spaces inter-convert as follows: <p> +------- sRGB<br> |<br> LabQ ----- Lab ----- XYZ ----- RGB<br> | | |<br> | | +------- Yxy<br> | |<br> | +------- LCh ----- UCS<br> |<br> +-------- LabS<br> <p> The colour spaces are: <p> LabQ --- This is the principal VIPS colorimetric storage format. See <a href='im_LabQ2Lab.3.html'>im_LabQ2Lab(3)</a> for an explanation. You cannot perform calculations on LabQ images. They are for storage only. <p> LabS --- This format represents coordinates in CIE Lab space as 16-bit integers. It is the best format for computation, being relatively compact, quick, and accurate. Colour values expressed in this way are hard to visualise. See the page for im_LabQ2LabS(). <p> Lab --- Coordinates in CIE Lab space are represented as float values in the usual range. This is the easiest format for general work: adding 50 to the L channel, for example, has the expected result. <p> XYZ --- CIE XYZ colour space. <p> Yxy --- CIE Yxy colour space. <p> RGB --- This format is compatible with the RGB colour systems used in other packages. If you want to export your image to a PC, for example, convert your colorimetric image to RGB, then turn it to TIFF with <a href='vips2TIFF.1.html'>vips2TIFF(1)</a> . You need to supply a structure which characterises your display. See the manual page for <a href='im_col_XYZ2rgb.3.html'>im_col_XYZ2rgb(3)</a> for hints on these guys. <p> sRGB --- This is a standard RGB, as defined by: <p> <a href='http://www.color.org/contrib/sRGB.html'>http://www.color.org/contrib/sRGB.html</a> <br> <p> it’s handy for carrying colour information through JPEG compressors, for example. <p> LCh --- Like Lab, but the rectangular ab coordinates are replaced with the polar Ch (Chroma and hue) coordinates. Hue angles are expressed in degrees. <p> UCS --- A colour space based on the CMC(1:1) colour difference measurement. This is a highly uniform colour space, much better than Lab for expressing small differences. Conversions to and from UCS are extremely slow. <p> These conversions set the Type field in the image header to LABQ, LABS, LAB, XYZ, RGB, sRGB, LCH and UCS respectively. The Type field is for user information only --- no function reads the Type field to determine its behaviour. Visualisation programs, such as <a href='ip.1.html'>ip(1)</a> , use the Type field to help present the information to the user. <p> All VIPS colour spaces are based around D65. <p> VIPS has functions for finding colour difference images. See <a href='im_dE_fromLab.3.html'>im_dE_fromLab(3)</a> . <p> <h2><a name='sect3' href='#toc3'>Return Value</a></h2> The functions return 0 on success and -1 on error. <h2><a name='sect4' href='#toc4'>See Also</a></h2> <a href='im_col_XYZ2rgb.3.html'>im_col_XYZ2rgb(3)</a> , <a href='im_dE_fromLab.3.html'>im_dE_fromLab(3)</a> , <a href='im_LabQ2Lab.3.html'>im_LabQ2Lab(3)</a> , <a href='im_Lab2disp.3.html'>im_Lab2disp(3)</a> . <h2><a name='sect5' href='#toc5'>Copyright</a></h2> National Gallery and Birkbeck College, 1990 - 1993 <h2><a name='sect6' href='#toc6'>Author</a></h2> K. Martinez - 2/12/1992 <br> J. Cupitt - 21/7/93 <p> <hr><p> <a name='toc'><b>Table of Contents</b></a><p> <ul> <li><a name='toc0' href='#sect0'>Name</a></li> <li><a name='toc1' href='#sect1'>Synopsis</a></li> <li><a name='toc2' href='#sect2'>Description</a></li> <li><a name='toc3' href='#sect3'>Return Value</a></li> <li><a name='toc4' href='#sect4'>See Also</a></li> <li><a name='toc5' href='#sect5'>Copyright</a></li> <li><a name='toc6' href='#sect6'>Author</a></li> </ul> </body> </html>