开发者

Some JPEG images are not working in IE

Hello,

I have a press archive. The press archive displays automattically created thumbnails as links to a PDF document.

This is what i get in IE 6, 7 & 8:

alt text http://c0759972.cdn.cloudfiles.ra开发者_JS百科ckspacecloud.com/100316-jpeg-plus-ie-equals-immense-destruction.png

While it works fine in Chrome:

alt text http://c0759972.cdn.cloudfiles.rackspacecloud.com/100316-jpeg-plus-chrome-equals-passionate-love-2.png

The thumbnails are automatically created by imagemagick:

$cmd = 'convert ' . $_FILES['file']['tmp_name'] # This is a PDF file
 . '[0]' # This indicates that it is the first page that should be converted
 . ' -resize "120x120>" ' # This is the size of the thumbnail
 . $thumb_path; # This is the destination
 $resize_output = exec($cmd);

A command can look like this

convert /tmp/AcXDYe[0] -resize "120x120>" /var/www[...]

However

I looked a little closer on the images and it seems that they are a little different and this is a theme among all the failing images

  • Image that does'nt work in IE: http://regex.info/exif.cgi?url=http://bit.ly/aFTL3T
  • Image that works fine: http://regex.info/exif.cgi?url=http://bit.ly/b71B7R

So, can i change my imagemagick command so that creates IE-compatible JPEGS?


The image site specifically says:

No color-space metadata and no embedded color profile: Windows and Mac web browsers treat colors randomly.

Images for the web are most widly viewable when in the sRGB color space and with an embedded color profile.


I get the same problem with a static jpeg (made with Adobe Illustrator CS4).

<img src="{$PT_WWW_PATH}img/logo/logo_cominar_couleurs.jpg" alt="Cominar">

Edit:

The jpeg was using "PANTONE" color profile. I converted it to sRGB and now it works.


Simply upload the Image to Google image search then save the image from search result screen. It will eliminate any error in jpeg encryption and the downloaded image will work on any browser.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜