Page 1 of 1

very strange results from pdf conversions

Posted: 2010-07-16T01:39:57-07:00
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?

Re: very strange results from pdf conversions

Posted: 2010-07-16T01:43:07-07:00
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

Re: very strange results from pdf conversions

Posted: 2010-07-16T09:26:52-07:00
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

Re: very strange results from pdf conversions

Posted: 2010-07-16T09:31:20-07:00
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

Re: very strange results from pdf conversions

Posted: 2010-07-16T09:59:18-07:00
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

Re: very strange results from pdf conversions

Posted: 2010-07-16T14:54:40-07:00
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...