PDF's to JPEG's, displaying in different browsers

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dunnma
Posts: 8
Joined: 2009-10-01T21:11:58-07:00
Authentication code: 8675309

PDF's to JPEG's, displaying in different browsers

Post by dunnma »

I have several PDF's that I upload and use the following command to convert to JPEG's:

Code: Select all

convert -density 300 "PDF" -resize 750x1000 -quality 65 "image%02d_f.jpg"
After I do this, I then run the following command to create a thumbnail of the large image:

Code: Select all

find /path/to/folder -name \'*.jpg\' -exec convert \'{}\' -thumbnail 163x250 -quality 60 -alpha on -virtual-pixel transparent -filter point \( +clone -flip -size 163x100 gradient:gray50-black -alpha off -compose CopyOpacity -composite -channel A -evaluate multiply .35 +channel \) -append +distort Perspective \'0,0,0,0 0,163,0,163 163,0,153,10 163,163,153,153\' -gravity North -crop 163x350+0+0! -background white -compose Over -flatten \'{}\'_t.jpg \;
After the images are created they are uploaded to my CDN.

I have noticed after doing 50+ PDF's that I have varying results.

All of the images load and look correct in Firefox, Opera, and Chrome. Some of the images do not load in IE at all (neither IE8 nor IE7). Those same images that do not load in IE, show up as negative images in Safari.

Because of this I am going to assume that the problem is with the created image and not something to do with the browsers. I have searched and found nothing. Does anyone have any insight as to what might be causing the problem and how i get them to work in ALL browsers?

Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF's to JPEG's, displaying in different browsers

Post by fmw42 »

some browsers do not display CMYK images. are any of your pdfs producing jpgs in cmyk? check the verbose info: on your jpgs and see. identify -verbose image.jpg or identify -verbose image.pdf.


With PDFs, I believe that you can convert them to rgb prior to loading

convert -density 300 -colorspace RGB image.pdf -resize 750x1000 -quality 65 "image.jpg"
Post Reply