Re: [Lcms-user] Serializing CIELab to buffer
An ICC-based CMM for color management
Brought to you by:
mm2
|
From: Noel C. <NCa...@Pr...> - 2018-02-09 13:44:07
|
Look into the cmsSaveProfile.... functions.
By the way (for Marti) there's a typo in the documentation for cmsSaveProfileToMem; "guareanteed" should be "guaranteed".
-Noel
From: Aaron Boxer [mailto:bo...@gm...]
Sent: Fri, February 9, 2018 8:33 AM
To: lcm...@li...
Subject: [Lcms-user] Serializing CIELab to buffer
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
|