IM_ICC_*()(3)

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

SYNOPSIS
#include <vips/vips.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_import_embedded( IMAGE *in, IMAGE *out,
  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(3) 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(3) 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. The output profile is attached to the output image under the name icc-profile-data . Functions like im_vips2jpeg(3) will then attach the profile to the files they create. im_icc_import(3) 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_import_embedded(3) takes an image to D50 Lab float (profile interconnect space) from device space, using the profile embedded in the image. If there is no embedded profile, an error is returned. Test for the presence of a profile with im_header_get_type(3). im_icc_export_depth(3) 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. The profile is attached to the output image under the name icc-profile-data . Functions like im_vips2jpeg(3) will then attach the profile to the files they create. im_icc_export(3) behaves just as im_icc_export_depth(), but with depth always 8 bit. im_icc_ac2rc(3) 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