Page 1 of 1

Semi-Corrupt JPEG problem

Posted: 2008-12-07T15:48:45-07:00
by dirving
Hi everyone,

I have some code that I've written in C using the MagickWand API. The code does some basic operations on my input images, resizing, resampling, changing the colorspace if necessary, etc, etc. The problem that I have is that the output JPEG file seems to be corrupt in some manner. Linux, OS X, and Windows can open and manipulate the file, FireFox 3, and Safari also have no issue. The problem comes in with FireFox 2 and IE6 & IE7. Neither of these browsers are able to load the file. I don't believe the code is to blame since if I change the output to a GIF file, all browsers and OS'es can load it just fine. Any ideas? I'm not that knowledgeable when it comes to the inner-format of graphics files so I'm hoping someone can help me out. Here is one of the "corrupt" output files:

http://wbd.wbdhost.com/3383.jpeg

Much Thanks,
David

Re: Semi-Corrupt JPEG problem

Posted: 2008-12-07T16:20:31-07:00
by magick
Many browser cannot handle JPEG images that are in the CMYK colorspace such as yours or if they are progressively encoded. Use this command to inspect your image

identify -verbose 3383.jpeg

and use profiles to convert your image from CMYK to RGB and set the image interlace to NoInterlace to prevent progressive encoding.