Andy_Bell
United Kingdom
37 Posts |
Posted - Nov 10 2020 : 10:10:23
|
Hi
My system has CMS set to true, as I want the images to look correct on screen.
However, at times I need to batch convert some images without displaying them, giving the user the choice to either change the ICC profile or leave the original in place.
My understanding is that if CMS is true in the global settings, then IE's default operation is to discard the ICC profile after loading the image and to save it with sRGB...
So, my code looks something like this:
IEGlobalSettings()->EnableCMS = false; //turn off cms so as not to lose the embedded profile IE->IO->LoadFromFile("image.cr3"); IE->IO->SaveToFile("out.tif"); IEGlobalSettings()->EnableCMS = true;
However, this does not work - the ICC profile is still stripped from the image and no profile is embedded in the image when it is saved...
If I NEVER turn CMS on then IE still removes the embedded profile and saves the image without one.
So, how do I load an image and save it and retain its color profile?
My sample project and test file, that has ProPhotoRgb ICC embedded can be downloaded from:
www.andybellphotography.com/ImageEn/ie_test_cms.zip
Andy
Andy |
|