ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder
ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 CMS Issue C++ Builder 2007 & latest ImageEn
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Andy_Bell

United Kingdom
30 Posts

Posted - Nov 10 2020 :  10:10:23  Show Profile  Reply
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

xequte

5677 Posts

Posted - Nov 19 2020 :  16:08:59  Show Profile  Reply
Hi Andy

Input ICC profiles are not extracted from RAW files. ICC is applied inside the libraw decoder and then discarded.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: