Re: From embedded profile to LAB to sRGB
Posted: 2014-04-26T14:38:07-07:00
Hi there,
back to color space -- the final frontier...
but when trying to extract the profile from input-small.tiff using
IM would always complain that "no color profile is available". In contrast, extracting the profile from the original image
worked flawlessly. (I also tried to re-apply the thus extracted profile during the minification process like
but still no luck.)
To cut a long story short: Currently I can only offer the original 185 MB file!
Firefox and my smartphone's Android browser mess it up, but Chromium does get it right!
It seems to me that convert (at least my 6.8.8 version) is unable to retain or embed profiles in TIFF and JPEG files...
However, when applying this line to my input image, the output looks terrible -- way too saturated and with a strong tint of blue. Maybe the problem is that -- just with sRGB -- there seem to be many different LAB color spaces. The only LAB profile I've currently got on my system is ITULab, which, I understand, uses different quantum ranges for representing L, a and b values, as compared to e.g. CIELab. (So which encoding does IM actually expect when working in LAB mode?) (BTW, does anyone know where to get from a CIELab icc file? Should be some sort of "identity" profile since, I understand, CIELab is one of the common PCSs, and color-management enabled software should be able to convert between CIELab and CIEXYZ as needed, right?)
Another questions that came to my mind: IM's -profile operator seems to have a somewhat unintuitive (at least to me) mode of operation since different occurances of this operator within the same command line have very different effects, which, in addition, depend on whether the input image does already have a profiel embedded or not. So I wonder if it would at all be possible to perform multiple profile-based colorspace conversions in a single command line? (Roghly like
to stay with the previous example )
So much to learn, so little time...
Best regards --
Torsten
back to color space -- the final frontier...

As mentioned before, the input.tiff is available at http://www.tcrass.de/files/input.tiff. I tried to create a down-scaled version not containing the thumbnail, but I didn't succeed -- the resuting images always seemed to lack the profile embedded in the original image file. I tried something likesnibgo wrote:I would need to see your input.tiff to comment. I don't know what happens if you try to store Lab pixels in jpeg.
Code: Select all
convert input.tiff -delete 1 -resize 960x input-small.tiff
Code: Select all
convert input-small.tiff icc:input-small.icc
Code: Select all
convert input.tiff -delete 1 icc:input.icc
Code: Select all
convert input.tiff -delete 1 -resize 960x (-profile input.icc){0,3} input-small.tiff
To cut a long story short: Currently I can only offer the original 185 MB file!
Neat!snibgo wrote:You might gain some insight from a file I made:
If your browser respects profiles, "red" is in red, "blue" is in blue. If it ignores profiles, the colours are green and red. This is because I have converted it to a weird profile.

Confirmed, does work.snibgo wrote:You can extract the profile with either ...Code: Select all
convert redBlue.png rb.icc
Does not work! Not only does convert give a warning (the usual "no color profile is available"), but the resulting icc file does have a size of 0 bytes!snibgo wrote:Code: Select all
convert redBlue.jpg rb2.icc
It seems to me that convert (at least my 6.8.8 version) is unable to retain or embed profiles in TIFF and JPEG files...
But wouldn't it be rather pointless to create/scan images in, say: ProPhoto RGB, just to throw away the additional color/brightness information by converting it to sRGB prior to processing? I mean, I'm well aware that sRGB should be the final color space for many applications (e.g. Web galleries or customer-oriented print shops), but imagine I'd like to brighten up the darker parts of images. When immediately converting to sRGB, I would lose a lot of material (sensu discrete brightness steps) I could otherwise work with, wouldn't I?snibgo wrote: This is one reason I do most of my processing in sRGB -- because IM (and most other software) knows how to process it.
As mentioned in my initial posting, I'd like to do some processing in LAB (and possibly HCL). Shouldn't it be possible to apply an LAB profile, then strip the profile and *set* the colorspace to LAB using something likesnibgo wrote: After converting to sRGB, I can easily "-colorspace" to and from other colour models,
Code: Select all
convert input.tiff -delete 1 -profile LAB.icc -strip -set colorspace LAB <do some processing in LAB, e.g. -channel R -level 10%,90% +channel> <perhaps convert to HCL using -colorspace HCL> <do some processing in HCL> -colorspace sRGB output.jpg
Another questions that came to my mind: IM's -profile operator seems to have a somewhat unintuitive (at least to me) mode of operation since different occurances of this operator within the same command line have very different effects, which, in addition, depend on whether the input image does already have a profiel embedded or not. So I wonder if it would at all be possible to perform multiple profile-based colorspace conversions in a single command line? (Roghly like
Code: Select all
convert input.tiff -delete 1 <convert to LAB using -profile> <do some processing in LAB> <convert to LCH using -profile> <do some processing in LCH> <convert to sRGB using -profile> output.jpg
So much to learn, so little time...
Best regards --
Torsten