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

NAME

6       im_LabQ2Lab,   im_Lab2LabQ,  im_LabQ2LabS,  im_LabS2LabQ,  im_Lab2LabS,
7       im_LabS2Lab - pack and unpack LABPACK images.
8

SYNOPSIS

10       #include <vips/vips.h>
11       #include <vips/colour.h>
12
13       int im_LabQ2Lab(in, out)
14       IMAGE *in, *out;
15
16       int im_Lab2LabQ(in, out)
17       IMAGE *in, *out;
18
19       int im_Lab2LabS(in, out)
20       IMAGE *in, *out;
21
22       int im_LabS2LabQ(in, out)
23       IMAGE *in, *out;
24
25       int im_LabS2Lab(in, out)
26       IMAGE *in, *out;
27
28       int im_LabQ2LabS(in, out)
29       IMAGE *in, *out;
30
31

DESCRIPTION

33       These functions pack and unpack LAB images.
34
35       LabQ is Lab packed in to 4 unsigned chars, with the Coding field set to
36       LABPACK.   It  counts  as  a coded type, since most operations will not
37       give the correct result on an image of this type.   This  is  the  MARC
38       image  type. Bits are allocated as 10 for L and 11 for each of a and b.
39       The first three bytes contain  the  8  most  significant  bits  of  Lab
40       respectively,  the  final  byte  has  2/3/3  bits  (MSB on left) of Lab
41       respectively.
42
43       im_LabQ2Lab() and im_Lab2LabQ() convert LABPACK images  to  three  band
44       float  images, scaled to look sensible to humans. This is the most con‐
45       venient LAB format for development work, but is rather slow.
46
47       im_LabQ2LabS() and im_LabS2LabQ() convert LABPACK  to  and  from  three
48       band  signed  short  images. L is shifted and masked to be in the range
49       [0,32767], a and b are shifted and masked  to  lie  in  [-32768,32767].
50       This  is  the  best  computational  LAB format, combining precision and
51       speed. Programs such as conv(1X) and similarity(1X), which can  operate
52       directly on LABPACK images, unpack to LabS for computation.
53
54

RETURN VALUE

56       The functions return 0 on success and -1 on error.
57

SEE ALSO

59       im_col_XYZ2rgb(3), im_dE_fromdisp(3), im_XYZ2disp(3).
60
62       National Gallery, 1990 - 1993
63

AUTHOR

65       J. Cupitt - 21/7/93
66
67
68
69                                2 Decemder 1992                 IM_XYZ2disp(3)
Impressum