Re: [Lcms-user] General question about CIE Lab and TIFF
An ICC-based CMM for color management
Brought to you by:
mm2
From: Aaron B. <bo...@gm...> - 2019-08-19 13:10:18
|
Mark, thanks! Extremely helpful. Yeah, working with TIFF is like going back in time. Currently I extract IPTC , ICC and XMP from TIFF files, but I will look into EXIF, as exiftool can add this to jpeg 2000 files. I am trying to get as close to lossless (data and meta-data) as I can while governed by the j2k standard. So, with j2k, there are enumerated colour spaces such as sRGB, CMYK, there are ICC colour spaces with profile, and there is CIE LAB, which comes in two variants: "default" CIE (default illuminant D50 and default Lab range) and "custom" CIE with specified illuminant and 6 32-bit integers specifying the Lab range. It's not possible to have CIE pixel data along with ICC profile. So, if I have a TIFF file with CIELAB or ICCLAB and no ICC profile, I map this to "default" CIE in jpeg 2000. But, suppose I have CIELAB with ICC. Is it possible with lcms to extract the illuminant and Lab range from the ICC, and store that in the j2k file ? And vice-versa, when decompressing custom CIE, can I convert an illumanant with Lab range into an ICC profile? Thanks again! Aaron On Sun, Aug 18, 2019 at 6:50 PM Mark Allen <m.f...@pl...> wrote: > As far as I know there are three places where color management info > appears in TIFF: the common one, the old one, and the obscure one. And > this is TIFF and it’s got a mass quantities of tags and I may not know > about all of them. There could be more obscure ones I’ve missed. > > 1) The standard ICC profile: TIFFTAG_ICCPROFILE Modern software which does > color management will honor this one. > > 2) Three chromaticities, a white point, and a “gamma”: > TIFFTAG_PRIMARYCHROMATICITIES, TIFFTAG_WHITEPOINT, and > TIFFTAG_TRANSFERFUNCTION. These are the pre-ICC profile way of doing things > and I doubt much software will even look at these anymore. I tried to honor > them in a TIFF reader and I never managed to find an example file using the > transfer function. Maybe some old adobe software generated it. It doesn’t > help that they implemented a more general transfer function instead of a > simple gamma exponent. > > 3) EXIF tags: #40961. I'm just going from memory here but I believe some > digital cameras (maybe professional Nikons) can output TIFFs which include > EXIF data. I know JPEGs do this but I believe the EXIF document said that > you could also insert EXIF data in TIFFs. In any case you can specify sRGB > and adobe RGB using tag #40961. 65535 means unspecified, 1 means sRGB, and > 2 is the unofficial way of specifying adobe RGB. I seem to recall finding > the #40961 EXIF tag in JPEGs rather than an ICC profile for both sRGB and > adobe RGB pictures. It looks like EXIF TIFFs do the same thing if I'm > reading the EXIF document correctly (https://www.exif.org/Exif2-2.PDF) > and some software might actually look at that. You could output #40961 if > you're trying to be extremely thorough. > > If you're trying to create a TIFF with the most clearly specified color > management info then you include the ICC profile because that's what modern > software is going to generate and honor. The three chromaticies, white > point, and gamma tags are probably not honored by much software but I guess > there's no harm in putting them out there. TIFF readers ignore lots of tags > and unrecognized ones are generally just ignored. If you have a JPEG2000 > which is sRGB or adobe RGB and you're outputing a TIFF then I suppose you > could include the EXIF tag #40961 but I'm not 100% sure that TIFFs really > include them. That's just how I read the EXIF document. > > If you’re writing a TIFF and it’s practical color management that you’re > interested in then you could just output the ICC profile and call it a day. > If you want to be extremely thorough then you could generate the other two > kinds of info because it’s not that much more work. > > If you’re reading TIFFs and trying not to lose color management info then > it would be more work to honor 2) and its transfer function and I don’t > know if anybody actually generates it anymore. > > TIFF - it's an adventure... > > > > _______________________________________________ > Lcms-user mailing list > Lcm...@li... > https://lists.sourceforge.net/lists/listinfo/lcms-user > |