Method
VipsImageicc_transform
Declaration [src]
int
vips_icc_transform (
VipsImage* in,
VipsImage** out,
const char* output_profile,
...
)
Description [src]
Optional arguments:
pcs
:VipsPCS
, use XYZ or LAB PCSintent
:VipsIntent
, transform with this intentblack_point_compensation
: %gboolean, enable black point compensationembedded
: %gboolean, use profile embedded in input imageinput_profile
: %gchararray, get the input profile from heredepth
: %gint, depth of output image in bits
Transform an image with a pair of ICC profiles. The input image is moved to profile-connection space with the input profile and then to the output space with the output profile.
The input profile is searched for in three places:
-
If
embedded
is set, libvips will try to use any profile in the input image metadata. You can test for the presence of an embedded profile withvips_image_get_typeof()
with #VIPS_META_ICC_NAME as an argument. This will return %GType 0 if there is no profile. -
Otherwise, if
input_profile
is set, libvips will try to load a profile from the named file. This can aslso be the name of one of the built-in profiles. -
Otherwise, libvips will try to pick a compatible profile from the set of built-in profiles.
If black_point_compensation
is set, LCMS black point compensation is enabled.
depth
defaults to 8, or 16 if in
is a 16-bit image.
The output image has the output profile attached to the #VIPS_META_ICC_NAME field.
Use vips_icc_import()
and vips_icc_export()
to do either the first or
second half of this operation in isolation.
This method is not directly available to language bindings.
Parameters
out
-
Type:
VipsImage
Output image.
The argument will be set by the function. The caller of the method takes ownership of the returned data, and is responsible for freeing it. output_profile
-
Type:
const char*
Get the output profile from here.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. ...
-
Type:
NULL
-terminated list of optional named arguments.