Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData ? #117

Closed
boxerab opened this issue Feb 20, 2017 · 3 comments
Closed

Comments

@boxerab
Copy link

boxerab commented Feb 20, 2017

Hello,

I have a jpeg 2000 file with an ICC profile.

PCS is cmsSigXYZData and color space is cmsSigGrayData.

The file can be found here: https://github.com/GrokImageCompression/grok/issues/38

I am working on a library that decodes the jpeg 2000 file and applies the ICC profile, using LCMS.

Currently, I have this code:

in_type = TYPE_GRAY_8;
out_type = TYPE_RGB_8;
out_prof = cmsCreate_sRGBProfile();

and I can create the transform and apply the ICC profile, but the output is an RGB file.
What I would like is to output a grayscale file.

So, if I instead call

out_prof = cmsCreateGrayProfile(NULL,NULL);

then cmsCreateTransform returns NULL and I can't apply the profile.

What is the best way of creating a transform for this kind of grayscale image ?

Thanks so much,
Aaron

@mm2 mm2 closed this as completed Feb 20, 2017
@mm2
Copy link
Owner

mm2 commented Feb 20, 2017

not an issue, cmsCreateGrayProfile(NULL,NULL) is not going to work because bad parameters.

@boxerab
Copy link
Author

boxerab commented Feb 20, 2017

Thanks. Can you recommend a better way of doing this?

@boxerab
Copy link
Author

boxerab commented Feb 20, 2017

Alright, will explore this issue further on user mailing list. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants