[Printing-architecture] Make use of extended color spaces on IPP printers

Solomon Peachy pizza at shaftnet.org
Thu May 27 19:04:56 UTC 2021


On Thu, May 27, 2021 at 08:04:30PM +0200, Till Kamppeter wrote:
> Also, if I have images (JPEG, TIFF, PNG, ...) how do I know which coloe
> space they are? imagetoraster seems not to determin whether images are sRGB
> or AdobeRGB.

TIFF, JPEG [1], and PNGs have standard ways to embed an ICC profile, and 
you'd have to parse that profile's description and search for 'AdobeRGB' 
(or sRGB).  Anything other than those two and you can probably just 
assume the file is DeviceRGB (or DeviceCMY[K] for CMY[K] TIFFs)

I think it's safe to assume that if there's no embedded profile in a 
file of those formats, it will be sRGB.  Where things get messier are 
formats [2] that don't support embedded profiles.

As for how to extract this, I routinely use exiftool on the command 
line, but libexiv2 is commonly used to do this (See [3] for an example) 
Once you have the profile, liblcms2 (already used by cups-filters) can 
parse it.

Incidently, my personal photo print flow submits DeviceRGB ppm files via 
lpr.  I don't care if the system defaults to assuming sRGB for 
everything, but IMO there needs to be a way to override that default via 
a runtime option...

[1] Plus jpeg2k, jpegxr, heif, webp, and undoubtedly others..
[2] gif, bmp, tga, and many, many others
[3] https://github.com/Exiv2/exiv2/blob/main/samples/toexv.cpp#L137

 - Solomon
-- 
Solomon Peachy			      pizza at shaftnet dot org (email&xmpp)
                                      @pizza:shaftnet dot org   (matrix)
High Springs, FL                      speachy (freenode)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/printing-architecture/attachments/20210527/a1339092/attachment.sig>


More information about the Printing-architecture mailing list