fogbound.net




Fri, 21 Mar 2008

Interesting Image Problem

— SjG @ 3:33 pm

So we had a jpeg image from someone, and were distributing it through a web-based system (note that all non-technical details in this whole posting will be presented in annoying vague language). The web-based system is PHP and uses GD-lib. GD-lib successfully thumbnails the images, but when the images are downloaded, both Firefox and IE7 complain that the image has errors:

The image file "foo.bar.baz.quux.jpg" cannot be displayed, because it contains errors.

Windows image browser shows the image successfully, and Photoshop happily opens it. Looking at the file itself, I can see that it *is* a JFIF file (e.g., a valid jpeg). It starts with the FFD8 header, etc. It does have some strange characters in the IPTC data. This turns out to be a red herring, however. The problem turns out to be that it’s a jpeg image, but it’s using an 8-bit CMYK color space, which isn’t supported by Firefox, IE6, or IE7.

Firefox/Mozilla will be supporting CMYK jpegs in the future. Opera already does. I’m not sure if IE8 will.

Later, I found a blog entry on this very topic, that, strangely I didn’t find when I Googled the error message. But there is good information out there. In fact, if you know to include the term “CMYK” you get tons of useful responses.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.