1IM_LAB_MORPH(3) Library Functions Manual IM_LAB_MORPH(3)
2
3
4
6 im_lab_morph - calculate colour differences
7
9 #include <vips/vips.h>
10
11 int im_lab_morph( IMAGE *in, IMAGE *out,
12 DOUBLEMASK *mask,
13 double L_offset, double L_scale,
14 double a_scale, double b_scale )
15
16
18 This function tweaks the colour in an LAB image. It's useful for making
19 a 'tweaked' image for sending to a colour printer.
20
21 It performs three corrections: first, it straightens the neutral axis
22 (this is useful if your printer tends to tint shadows slightly red, for
23 example); it moves L* by adding an offset and then multiplying by a
24 scale (useful if your printer thinks in relative colorimetry, for exam‐
25 ple), and finally scales a* and b* by a factor (useful if your printer
26 desaturates to avoid gamut clipping).
27
28 The neutral axis straightening is specified as a DOUBLEMASK containing
29 L*, a* and b* readings taken from a print of a neutral greyscale (one
30 with a* and b* zero). For example:
31
32 3 4
33 14.23 4.8 -3.95
34 18.74 2.76 -2.62
35 23.46 1.4 -1.95
36 27.53 1.76 -2.01
37
38 This is interpolated to make an a/b offset for each input value of L*.
39 The top and tail are interpolated towards [100,0,0] and [0,0,0].
40 Entries in the mask can be in any order.
41
42
44 All functions return 0 on success and -1 on error.
45
47 National Gallery, 2001
48
49
50
51
52 8 March 2001 IM_LAB_MORPH(3)