very strange results from pdf conversions

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ebgb
Posts: 11
Joined: 2010-03-24T15:04:01-07:00
Authentication code: 8675308

very strange results from pdf conversions

Post by ebgb »

everything was working file for a while, am now getting some very strange results from PDF to jpg conversions

run this line

convert -density 72 -quality 70 -scale '4800x4800' 17152_NGStrawberry28ct_0.pdf 17152_NGStrawberry28ct_0.jpg

and I get either: http://www.kelloggdaponline.com/PDF/171 ... 28ct_0.jpg

or http://www.kelloggdaponline.com/PDF/pre ... 28ct_0.jpg

as a result. the first loks almost like tis gone negative, the second is skewed and cropped

new server, intsalled IM etc a couple of days ago with

yum install ImageMagick.x86_64
yum install ghostscript.x86_64

any ideas?
ebgb
Posts: 11
Joined: 2010-03-24T15:04:01-07:00
Authentication code: 8675308

Re: very strange results from pdf conversions

Post by ebgb »

another example:


convert -density 175 17152_NGStrawberry28ct_0.pdf my_foo.jpg

gives http://www.kelloggdaponline.com/PDF/my_foo.jpg

original file http://www.kelloggdaponline.com/PDF/171 ... 28ct_0.pdf
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: very strange results from pdf conversions

Post by fmw42 »

ebgb wrote:another example:


convert -density 175 17152_NGStrawberry28ct_0.pdf my_foo.jpg

gives http://www.kelloggdaponline.com/PDF/my_foo.jpg

original file http://www.kelloggdaponline.com/PDF/171 ... 28ct_0.pdf

FILE NOT FOUND
ebgb
Posts: 11
Joined: 2010-03-24T15:04:01-07:00
Authentication code: 8675308

Re: very strange results from pdf conversions

Post by ebgb »

sorry! my fault I binned em whilst retrying various bits n pieces

think I cured it, updated IM to the latest version, which cured some but not all the problems

then added colorspace -RGB to the command line

some of the original PDF's were cmyk, some rgb, some had embedded colour profiles

by throwing the colorspace option in, it seems to overcome the issue
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: very strange results from pdf conversions

Post by fmw42 »

If your PDF files have profiles, then you are walking on the profiles if you add -colorspace RGB. That could be the cause of some of your problems. see http://www.imagemagick.org/Usage/formats/#profiles
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: very strange results from pdf conversions

Post by Drarakel »

ebgb wrote:the first loks almost like tis gone negative
That one was a CMYK JPG (without profile) - and your image viewer apparently doesn't understand CMYK. :wink:

You will get an image with large text and good overall quality from your PDF if you use color profiles and also supersampling. The result can be something like this (Link deleted). (I chose 144dpi as a compromise - the raster graphics within the PDF have 72dpi.)
But if you need it just for a quick preview image, '-colorspace RGB' will do it, too...
Post Reply