ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Srgb Profile

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pierrotsc Posted - Jan 27 2012 : 16:56:19
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
3   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Jan 28 2012 : 09:39:36
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.





pierrotsc Posted - Jan 28 2012 : 06:05:47
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
fab Posted - Jan 28 2012 : 01:33:35
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.