Re: [Lcms-user] conversion sRGB to L*a*b* fatal error
An ICC-based CMM for color management
Brought to you by:
mm2
From: <ma...@li...> - 2002-03-16 15:23:36
|
Hi, >good news for you. >conversion with icctrans works quite well - in both directions. > now i know how to deal with it :-) values are the same as in > photoshop - except for rounding differences. > >i must admit - hmmh - i made a beginners mistake... >when choosing color values with photoshop 'color picker' i was in > L*a*b* color space - and so was very often out of RGB gamut... > got a hot flush when i realised this. > sorry Mart=ED for this false alarm, my only excuse is that i _am_ a > newbie to color models and color handling. Don't apologize :-) You have done a great job checking the engine=20 and then reporting what seemed a bug to the list. This is the way we=20 uncovered bugs, so this is really a contribution, and it is welcome. >in that situation i threw my eyes upon the L*a*b* color model which > hopefully gives me what i want - at least it has one value to adjust > 'lightness'. Yep. Lab is very adequate for doing image manipulation. In first place, is near perceptually uniform. This is good for most operations. Then, it has Luma separated from chroma, again a nice feature.=20 Here are some "tricks" on Lab: - Addition works far better than in RGB. Adding two Lab values does = give the resulting Lab color. - To modify "brigtness" just add o substract a constant to L - To modify "contrast" apply a exp() on L.=20 - You can also use polar form of Lab LCh. There are a couple of = functions to convert Lab <-> LCh - You can "desaturate" or "oversaturate" color by = incrementing/decrementing C in LCh - Saturation of color is given by s =3D C/L - Hue angle is given by h Best Regards, Mart=ED Maria The little cms project http://www.littlecms.com ma...@li... ----- Original Message -----=20 From: Andreas Sch=F6mann=20 To: lcm...@li...=20 Sent: Saturday, March 16, 2002 9:34 AM Subject: Re: [Lcms-user] conversion sRGB to L*a*b* fatal error hi Mart=ED, good news for you. conversion with icctrans works quite well - in both directions. now i know how to deal with it :-) values are the same as in photoshop - except for rounding differences. i must admit - hmmh - i made a beginners mistake... when choosing color values with photoshop 'color picker' i was in L*a*b* color space - and so was very often out of RGB gamut... got a hot flush when i realised this. sorry Mart=ED for this false alarm, my only excuse is that i _am_ a newbie to color models and color handling. maybe you like to know how i came to lcms... i intend to make a tool to adjust brightness of each individual pixel of a picture - for now JPEGs. to do so i modified the IJG source code - needed three days of hard work... when i came to the point where i had access to the sample data i wondered how to modify the RGB values in order to modify brightness - but without changing the 'color' or at least my perception of a color becoming 'lighter'. whatever this _really_ means - need to find out more about it - i figured this must be difficult modifying three independent color values at once. in that situation i threw my eyes upon the L*a*b* color model which hopefully gives me what i want - at least it has one value to adjust 'lightness'. but how to convert RGB to L*a*b* from within C code? now i know the answer and am very happy with it. thank you Mart=ED and all others involved in lcms project! andreas ----- Original Message -----=20 From: Mart=ED Maria=20 To: Andreas Sch=F6mann ; lcm...@li...=20 Sent: Saturday, March 16, 2002 3:14 PM Subject: Re: [Lcms-user] conversion sRGB to L*a*b* fatal error Hi, > i am trying to validate the 'icctrans'-values for sRGB = IEC61966-2.1 to L*a*b* conversion.=20 Humm... I have checked this utility extensively, and seemed to work. = Are you sure Photoshop is using sRGB as workspace (Edit-Color = settings-Working spaces RGB)? I'm also attaching latest source, with some small additions. But = anyway the old one did work properly to me...=20 This would give sRGB to Lab icctrans -v And this Lab to sRGB icctrans -i*Lab If this don't work to you, could please send any values that makes = it fail? Thanks. Regards, Mart=ED Maria The little cms project http://www.littlecms.com ma...@li... ----- Original Message -----=20 From: Andreas Sch=F6mann=20 To: lcm...@li...=20 Sent: Friday, March 15, 2002 5:10 PM Subject: [Lcms-user] conversion sRGB to L*a*b* fatal error hello marti, i am trying to validate the 'icctrans'-values for sRGB = IEC61966-2.1 to L*a*b* conversion. i want to validate against adobe photoshop - i simply use the = 'color picker' to get values. i am unlucky :( neither the built in profile 'cmsCreateLabProfile(NULL)' nor = 'lcmstiff8.icm' nor 'tifflab8spac.icm' give me the photoshop values. i built lcms 1.08 with cygwin on win2000, build looked ok. what do you think? maybe i missed something? i'm not sure whether i use the right profiles. regards, andreas |