1IM_XYZ2disp(3)             Library Functions Manual             IM_XYZ2disp(3)
2
3
4

NAME

6       im_XYZ2disp,    im_disp2XYZ,    im_Lab2XYZ,   im_XYZ2Lab,   im_XYZ2Yxy,
7       im_Yxy2XYZ,   im_XYZ2sRGB,   im_sRGB2XYZ,    im_Lab2LCh,    im_LCh2Lab,
8       im_LCh2UCS, im_UCS2LCh - convert images between various colour spaces
9

SYNOPSIS

11       #include <vips/vips.h>
12       #include <vips/colour.h>
13
14       int im_XYZ2disp(in, out, display)
15       IMAGE *in, *out;
16       struct im_col_display *display;
17
18       int im_disp2XYZ(in, out, display)
19       IMAGE *in, *out;
20       struct im_col_display *display;
21
22       int im_Lab2XYZ(in, out)
23       IMAGE *in, *out;
24
25       int im_XYZ2Lab(in, out)
26       IMAGE *in, *out;
27
28       int im_XYZ2Yxy(in, out)
29       IMAGE *in, *out;
30
31       int im_Yxy2XYZ(in, out)
32       IMAGE *in, *out;
33
34       int im_XYZ2sRGB(in, out)
35       IMAGE *in, *out;
36
37       int im_sRGB2XYZ(in, out)
38       IMAGE *in, *out;
39
40       int im_Lab2LCh(in, out)
41       IMAGE *in, *out;
42
43       int im_LCh2Lab(in, out)
44       IMAGE *in, *out;
45
46       int im_LCh2UCS(in, out)
47       IMAGE *in, *out;
48
49       int im_UCS2LCh(in, out)
50       IMAGE *in, *out;
51
52

DESCRIPTION

54       Functions  to  convert  images between the different colour spaces sup‐
55       ported by VIPS: RGB, sRGB, XYZ, Yxy, Lab, LCh and UCS. RGB and sRGB are
56       three  band  uchar  files.  XYZ,  Lab, LCh and UCS are three band float
57       files.
58
59       These are the basic conversion routines provided by VIPS. Other conver‐
60       sions,  such  as im_Lab2disp(3), are built by composing these functions
61       and are provided as a convenience to the programmer.
62
63       The VIPS colour spaces inter-convert as follows:
64
65                               +------- sRGB
66                               |
67         LabQ ----- Lab ----- XYZ ----- RGB
68          |          |         |
69          |          |         +------- Yxy
70          |          |
71          |          +------- LCh ----- UCS
72          |
73          +-------- LabS
74
75       The colour spaces are:
76
77       LabQ --- This is the principal VIPS colorimetric  storage  format.  See
78       im_LabQ2Lab(3)  for  an explanation. You cannot perform calculations on
79       LabQ images. They are for storage only.
80
81       LabS --- This format represents coordinates in CIE Lab space as  16-bit
82       integers.  It is the best format for computation, being relatively com‐
83       pact, quick, and accurate. Colour values expressed in this way are hard
84       to visualise. See the page for im_LabQ2LabS().
85
86       Lab --- Coordinates in CIE Lab space are represented as float values in
87       the usual range. This is the easiest format for general work: adding 50
88       to the L channel, for example, has the expected result.
89
90       XYZ --- CIE XYZ colour space.
91
92       Yxy --- CIE Yxy colour space.
93
94       RGB  ---  This format is compatible with the RGB colour systems used in
95       other packages. If you want to export your image to a PC, for  example,
96       convert  your  colorimetric  image  to  RGB,  then turn it to TIFF with
97       vips2TIFF(1). You need to supply a structure which  characterises  your
98       display.  See  the manual page for im_col_XYZ2rgb(3) for hints on these
99       guys.
100
101       sRGB --- This is a standard RGB, as defined by:
102
103         http://www.color.org/contrib/sRGB.html
104
105       it's handy for carrying colour information  through  JPEG  compressors,
106       for example.
107
108       LCh  --- Like Lab, but the rectangular ab coordinates are replaced with
109       the polar Ch (Chroma and hue) coordinates. Hue angles are expressed  in
110       degrees.
111
112       UCS --- A colour space based on the CMC(1:1) colour difference measure‐
113       ment.  This is a highly uniform colour space, much better than Lab  for
114       expressing small differences. Conversions to and from UCS are extremely
115       slow.
116
117       These conversions set the Type field in the image header to LABQ, LABS,
118       LAB,  XYZ,  RGB,  sRGB, LCH and UCS respectively. The Type field is for
119       user information only --- no function reads the Type field to determine
120       its  behaviour.   Visualisation  programs,  such as ip(1), use the Type
121       field to help present the information to the user.
122
123       All VIPS colour spaces are based around D65.
124
125       VIPS  has  functions  for  finding  colour   difference   images.   See
126       im_dE_fromLab(3).
127
128

RETURN VALUE

130       The functions return 0 on success and -1 on error.
131

SEE ALSO

133       im_col_XYZ2rgb(3), im_dE_fromLab(3), im_LabQ2Lab(3), im_Lab2disp(3).
134
136       National Gallery and Birkbeck College, 1990 - 1993
137

AUTHOR

139       K. Martinez - 2/12/1992
140       J. Cupitt - 21/7/93
141
142
143
144                                2 Decemder 1992                 IM_XYZ2disp(3)
Impressum