Quality problems pdf to scaled jpg

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
JH_mijn

Quality problems pdf to scaled jpg

Post by JH_mijn »

Hello,

Can you help me with the following situation:

I have a PDF (A4 format) and convert it to jpg with imagemagick.
This is fine, sufficient quality.

Now I want to scale generated jpg to a width of 425 pixels.
Now the generated file will lose too much quality.


exec("convert -geometry 1600x1600 -colorspace rgb -density 200x200 -quality 100 -units pixelsperinch ".ORGINEEL_PDF." ".ORGINEEL_JPG);
exec("convert -sharpen 0x5 -scale 425x600 ".ORGINEEL_JPG." ".RESULT_FILE);



How can I improve the outcome for print.

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

Re: Quality problems pdf to scaled jpg

Post by fmw42 »

I don't think -geometry does anything here. It is typically used with compositing two images

try

exec("convert -colorspace rgb -density 200x200 -units pixelsperinch ".ORGINEEL_PDF." -sharpen 0x5 -resize 425x600 -quality 100 ".RESULT_FILE);

or

exec("convert -colorspace rgb -density 200x200 -units pixelsperinch ".ORGINEEL_PDF." -resize 425x600 -sharpen 0x5 -quality 100 ".RESULT_FILE);
Post Reply