pdf to jpg resolution problem

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?".

pdf to jpg resolution problem

Postby mij » 2008-03-30T14:03:08+00:00

I'm trying to convert each page of a pdf file to a low resolution jpg and a high resolution one. I'm using
Code: Select all
convert -scale 2000x1000 file.pdf hi-res%d.jpg
convert -scale 1000x500 file.pdf lo-res%d.jpg

It does creates a 1000x500 and 2000x1000 jpg for each page of the pdf, but both images are identical in definition. I mean, the hi-res image is just a pixelated scaled-up version of the lo-res one, even the text, wich should not be afected by resolution as far as I know.
Is there just a limit in the resolution that can be achieved converting a pdf into jpg??
mij
 
Posts: 12
Joined: 2008-03-30T11:10:53+00:00

Re: pdf to jpg resolution problem

Postby Bonzo » 2008-03-30T14:17:55+00:00

Look back through the previous posts there are quite a few questions about this. From memory you need to add a -density before reading in the image?
http://www.imagemagick.org/script/comma ... p?#density

Also -resize may be better than -scale; you can then try different filters.
http://www.imagemagick.org/script/comma ... hp?#resize

Note: Read the image in first.

Would something like this work ?
Code: Select all
convert -density 400 file.pdf -scale 2000x1000 hi-res%d.jpg
ImageMagick examples mostly using php http://www.rubblewebs.co.uk/imagemagick/
New section ( still in progress ) showing examples of all the operators http://www.rubblewebs.co.uk/imagemagick/operator.php
Bonzo
 
Posts: 1155
Joined: 2006-05-20T08:08:19+00:00
Location: Cambridge, England

Re: pdf to jpg resolution problem

Postby mij » 2008-04-15T06:05:26+00:00

It just worked perfetcly. Thanks
mij
 
Posts: 12
Joined: 2008-03-30T11:10:53+00:00


Return to Users

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 5 guests