Table of Contents

Name

im_lab_morph - calculate colour differences

Synopsis

#include <vips/vips.h>

int im_lab_morph( IMAGE *in, IMAGE *out,
DOUBLEMASK *mask,

double L_offset, double L_scale,

double a_scale, double b_scale )

Description

This function tweaks the colour in an LAB image. It’s useful for making a ’tweaked’ image for sending to a colour printer.

It performs three corrections: first, it straightens the neutral axis (this is useful if your printer tends to tint shadows slightly red, for example); it moves L* by adding an offset and then multiplying by a scale (useful if your printer thinks in relative colorimetry, for example), and finally scales a* and b* by a factor (useful if your printer desaturates to avoid gamut clipping).

The neutral axis straightening is specified as a DOUBLEMASK containing L*, a* and b* readings taken from a print of a neutral greyscale (one with a* and b* zero). For example:

       3 4
       14.23 4.8 -3.95
       18.74 2.76 -2.62
       23.46 1.4 -1.95
       27.53 1.76 -2.01

This is interpolated to make an a/b offset for each input value of L*. The top and tail are interpolated towards [100,0,0] and [0,0,0]. Entries in the mask can be in any order.

Return Value

All functions return 0 on success and -1 on error.

Copyright

National Gallery, 2001


Table of Contents