CMYK TIFFs ignoring black pixel data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CMYK TIFFs ignoring black pixel data

Simon Bear
Hi folks,

Recently John Page, a colleague of mine, alerted you to a problem with CMYK TIFFs loading with their colours inverted.  We recently noticed that the images that we were producing now appeared to be overly saturated.  After some digging I found that the black pixel data is being ignored when loading CMYK images.  So I've created a patch to integrate the black channel into the RGB pixel data when loading compressed and uncompressed CMYK images.  The images now appear (to my untrained eye) to match the RGB output created by The GIMP, Picassa and Quicktime but curiously not Windows Image Viewer (I'm not sure whether this is a feature or a bug ;)).

You can find some CC BY-NC-ND licensed test data at https://data.csiro.au/dap/landingpage?pid=csiro:4761.  All these images are uncompressed, I created a compressed version using ImageMagick's convert.

I've put the patch up at http://pastebin.com/Zi0nihw9

Cheers,

Simon

PS I tried to send this message a few days ago with the patch as an attachment but it doesn't seem to have gone through.  So apologies if this ends up as a duplicate.
Simon Bear
Software Developer | Data Management Services Program
Information Management & Technology (IMT)
CSIRO
Phone: +61 2 6124 1410
[hidden email]<mailto:[hidden email]> | www.csiro.au<http://www.csiro.au/>
Address: Building 1a Wilf Crane Crescent, YARRALUMLA ACT, 2600
PLEASE NOTE
The information contained in this email may be confidential or privileged. Any unauthorised use or disclosure is prohibited. If you have received this email in error, please delete it immediately and notify the sender by return email. Thank you. To the extent permitted by law, CSIRO does not represent, warrant and/or guarantee that the integrity of this communication has been maintained or that the communication is free of errors, virus, interception or interference.
Please consider the environment before printing this email.


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: CMYK TIFFs ignoring black pixel data

Rasband, Wayne (NIH/NIMH) [E]
On Oct 28, 2012, at 8:40 PM, Simon Bear wrote:

> Hi folks,
>
> Recently John Page, a colleague of mine, alerted you to a problem with CMYK TIFFs loading with their colours inverted.  We recently noticed that the images that we were producing now appeared to be overly saturated.  After some digging I found that the black pixel data is being ignored when loading CMYK images.  So I've created a patch to integrate the black channel into the RGB pixel data when loading compressed and uncompressed CMYK images.  The images now appear (to my untrained eye) to match the RGB output created by The GIMP, Picassa and Quicktime but curiously not Windows Image Viewer (I'm not sure whether this is a feature or a bug ;)).
>
> You can find some CC BY-NC-ND licensed test data at https://data.csiro.au/dap/landingpage?pid=csiro:4761.  All these images are uncompressed, I created a compressed version using ImageMagick's convert.
>
> I've put the patch up at http://pastebin.com/Zi0nihw9

This patch, which fixes a bug that sometimes caused ImageJ to incorrectly open CMYK TIFFs, is in the v1.47e daily build.

-wayne

> Cheers,
>
> Simon
>
> PS I tried to send this message a few days ago with the patch as an attachment but it doesn't seem to have gone through.  So apologies if this ends up as a duplicate.
> Simon Bear
> Software Developer | Data Management Services Program
> Information Management & Technology (IMT)
> CSIRO
> Phone: +61 2 6124 1410
> [hidden email]<mailto:[hidden email]> | www.csiro.au<http://www.csiro.au/>
> Address: Building 1a Wilf Crane Crescent, YARRALUMLA ACT, 2600
> PLEASE NOTE
> The information contained in this email may be confidential or privileged. Any unauthorised use or disclosure is prohibited. If you have received this email in error, please delete it immediately and notify the sender by return email. Thank you. To the extent permitted by law, CSIRO does not represent, warrant and/or guarantee that the integrity of this communication has been maintained or that the communication is free of errors, virus, interception or interference.
> Please consider the environment before printing this email.
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html