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
 Srgb Profile
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
499 Posts

Posted - Jan 27 2012 :  16:56:19  Show Profile  Reply
I am trying to find out on how to always work in a srgb profile. When i load an image, i want to have the srgb profile assign if no profile is detected or convert to srgb profile if another profile is detected.

How can i do that?
Thanks.
P

fab

1310 Posts

Posted - Jan 28 2012 :  01:33:35  Show Profile  Reply
quote:
...convert to srgb profile if another profile is detected.


It is done automatically if you set iegEnableCMS:=true
ImageEn will convert from source ICC to sRGB.
Source ICC is loaded in ImageEnView1.IO.Params.InputICCProfile.
Destination (display) ICC is preset in ImageEnView1.IO.Params.OutputICCProfile. ImageEn assigns sRGB for default.

quote:
When i load an image, i want to have the srgb profile assign if no profile is detected


A third profile object exist: "DefaultICCProfile". It contains the ICC profile to use in case the source image hasn't one. So you can write:

ImageEnView1.IO.Params.DefaultICCProfile.LoadFromFile('c:\Windows\System32\spool\drivers\color\AdobeRGB1998.icc');
ImageEnView1.IO.LoadFromFile('input.tif');


An important note: at the moment, ImageEn doesn't save color profiles if they are processed.
Go to Top of Page

pierrotsc

USA
499 Posts

Posted - Jan 28 2012 :  06:05:47  Show Profile  Reply
Ok...Let's see if i get it. First i have recompiled the source to include LCMS instead of using the default windows CMS. I know it says that it is slower. That is a drawback. Any advantages of using LCMS instead of CMS? I can always recompile the source.

I understand that if i enablecms, it automatically loads srgb. That is perfect.
If i load an image that has an adobergb profile, it will automatically convert it to srgb. If this is correct, then i am happy.

Now, are you telling me that if the picture has no profile, i have to load it from the hard drive and it will not convert to srgb automatically. I am confused on this part.

Now the last question...When i save an image, is the srgb profile saved with it? You are saying that the color profile is not saved if the image is processed. What do you mean by that.

Thanks.
P
Go to Top of Page

fab

1310 Posts

Posted - Jan 28 2012 :  09:39:36  Show Profile  Reply
quote:
Ok...Let's see if i get it. First i have recompiled the source to include LCMS instead of using the default windows CMS. I know it says that it is slower. That is a drawback. Any advantages of using LCMS instead of CMS? I can always recompile the source.



The embedded version of LCMS is outdated (unfixed bugs, security holes, etc...). Please don't use it.

quote:
I understand that if i enablecms, it automatically loads srgb. That is perfect.


Not exactly. ICC profile are always loaded.
If EnbaleCMS is true then the loaded color profile is also processed. If EnableCMS is true, the image is automatically converted to sRGB and the original profile is discarded.

quote:
If i load an image that has an adobergb profile, it will automatically convert it to srgb. If this is correct, then i am happy.


Exactly (you need only to set EnableCMS=true).

quote:
Now, are you telling me that if the picture has no profile, i have to load it from the hard drive and it will not convert to srgb automatically. I am confused on this part.



If the image has no profile, then it is assumed it is already sRGB. No further process is done.

quote:
Now the last question...When i save an image, is the srgb profile saved with it?


No, the sRGB profile is not saved with it with the following exception:
- the image had a profile and EnableCMS=false.





Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: