(v13) ICC profile management


This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP


There are two different forms of conversion that this API supports; ICC transforms use open_profile ()and close_profile (), custom colorspace conversions use open_custom_colorspace (). They can be mixed, in that an ICC conversion can precede a custom colorspace conversion in the same transform chain.

Profiles are accessed through the Blob API. For more information see sw_blob_api Struct Reference in the file /doc/HqnRIP_SDK_InterfaceRef.chm.

open_profile

open_profile() returns sw_cmm_result . It gets as input the CMM instance pointer, and a Blob instance, and stores a profile handle into the handle parameter pointer. The handle is used in the transform calls to refer to this profile. The open_profile() call normally uses the Blob API’s open() method to save a reference to the profile blob, which can then be accessed during the transform calls.

                      sw_cmm_result (RIPCALL *open_profile)
                                      (sw_cmm_instance *instance, sw_blob_instance *ICC_profile, sw_cmm_profile *handle);

instance

The alternate CMM implementation instance owning the ICC profile.

ICC_profile

A blob data source, giving access to the raw ICC profile data through the blob's sw_blob_api implementation methods.

handle

A pointer in which a CMM profile handle is stored, and used to refer to the profile by close_profile () and open_transform ().

It returns SW_CMM_SUCCESS if the profile was successfully opened, in which case a nonNULL profile pointer should have been stored in handle. If the profile could not be opened, one of the sw_cmm_result error codes is returned. If a valid profile handle is returned, the close_profile () method will be called to destroy the profile later.

close_profile

The close_profile() method takes a CMM instance pointer, and the profile handle created by the open_profile() call, and has no return result. Normally, this will be responsible for closing any Blob API reference that was stored

                      void (RIPCALL *close_profile)(sw_cmm_instance *instance,
                                  sw_cmm_profile profile);

.

instance

The alternate CMM instance owning the profile.

profile

A profile handle previous opened by an open_profile() or open_custom_colorspace () calls on the same alternate CMM instance. The alternate CMM implementation should discard any resources associated with the profile.