[Lcms-user] Serializing CIELab to buffer
An ICC-based CMM for color management
Brought to you by:
mm2
|
From: Aaron B. <bo...@gm...> - 2018-02-09 13:33:32
|
Hello Everyone,
I have a JPEG 2000 image with a stored CIELab color profile.
This profile is determined by 7 32 bit values.
My code currently uses LCMS to apply the profile to the image before
decoding to TIFF.
I would prefer to store this color profile in the TIFF image.
I can do that if I can serialize the profile into a buffer of bytes.
I am using LCMS to apply the CIELab as follows:
cmsHPROFILE in = cmsCreateLab4Profile(nullptr);
cmsHPROFILE out = cmsCreate_sRGBProfile();
cmsHTRANSFORM transform =
cmsCreateTransform(in, TYPE_Lab_DBL, out, TYPE_RGB_16,
INTENT_PERCEPTUAL, 0);
and then applying the transform to each pixel.
Is there a way of serializing this profile to a memory buffer, so that I
can store it in the TIFF file?
Thanks so much,
Aaron
|