Table of Contents

## Name

im_icc_present, im_icc_transform, im_icc_import, im_icc_export, im_icc_export_depth - transform images using ICC profiles

## Synopsis

#include <vips/vips.h>
#include <vips/colour.h>

#define VIPS_INTENT_PERCEPTUAL (0)
#define VIPS_INTENT_RELATIVE_COLORIMETRIC (1)
#define VIPS_INTENT_SATURATION (2)
#define VIPS_INTENT_ABSOLUTE_COLORIMETRIC (3)

int
im_icc_present( void )
int
im_icc_transform( IMAGE *in, IMAGE *out,
const char *input_profile_filename,
const char *output_profile_filename,
int intent )

int
im_icc_import( IMAGE *in, IMAGE *out,
const char *input_profile_filename, int intent )

int
im_icc_export_depth( IMAGE *in, IMAGE *out, int depth,
const char *output_profile_filename, int intent )

int
im_icc_export( IMAGE *in, IMAGE *out,
const char *output_profile_filename, int intent )

int
im_icc_ac2rc( IMAGE *in, IMAGE *out,
const char *profile_filename )

## Description

im_icc_present() returns non-zero if there is an ICC library available. Calls to the other VIPS ICC functions will all fail with an error message if there is no library.

im_icc_transform() maps between two images using an input and output profile and an intent. The input image must have a format matching the input profile (eg. 4 bands for a CMYK profile). The output image will have a form matching the output profile (eg. 3 bands for an RGB output profile). The input image must be 8 or 16 bit unsigned integer. The output image is always 8 bit unsigned int.

im_icc_import() takes an image to D50 Lab float (profile interconnect space) from device space. The input image must match the format expected by the profile: for example, a printer profile will usually need 4 band CMYK data. The input image must be 8 or 16 bit unsigned integer.

im_icc_export_depth() takes an image from D50 Lab float back to device space. The output image will match the format of the profile: for example, a screen profile will write 3 band RGB data. The output image biut depth can be set to 8 or 16 with the depth parameter.

im_icc_export() behaves just as im_icc_export_depth(), but with depth always 8 bit.

im_icc_ac2rc() converts an image from D50 absolute to media relative colorimetry using the media white point found in the ICC profile.

## Return Value

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

## See Also

im_LabQ2Lab(3) , im_Lab2XYZ(3) .

## Copyright

The National Gallery

Table of Contents

- Name
- Synopsis
- Description
- Return Value
- See Also
- Copyright