Is there a way of setting the resolution of the pdf file you are converting when convert calls gs? It appears that convert (or gs) is down sampling a pdf file to 72dpi before converting it to a jpg, causing alot of aliasing in the text. I used the -quality 100 but it doesn't seem to be having any effect on the jpg.
I manually did it using photoshop, pulled in the pdf, resized to 72dpi and same height as the one that convert made and saved it as a jpg of only 80 quality and the aliasing is almost non-existant so I know it can be done, just how with convert?
Converting pdf to jpg
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Converting pdf to jpg
-density...
See IM Examples, Postscript/PDF images
http://www.imagemagick.org/Usage/text/#postscript
PDF and PS are handled in basically the same way.
WARNING see
A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector
See IM Examples, Postscript/PDF images
http://www.imagemagick.org/Usage/text/#postscript
PDF and PS are handled in basically the same way.
WARNING see
A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Converting pdf to jpg
Anthony thanks. But I am still having issues trying to get the quality right. Here is what I have, maybe you can give me the best settings:anthony wrote:-density...
See IM Examples, Postscript/PDF images
http://www.imagemagick.org/Usage/text/#postscript
PDF and PS are handled in basically the same way.
WARNING see
A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector
I have to convert 3 different single page pdf file sizes:
5 1/2" x 8 1/2"
6" x 9"
8 1/2" x 11"
so that the text is readable at at 72dpi with a width of 300 pixels.
Bill H
Editted with more information
I am using:
convert -density 196 pdffile.pdf -resample 72 imagefile.jpg
and getting final sizes (width x height):
5 1/2 x 8 1/2 = 396 x 612
6 x 9 = 432 x 648
8 1/2 x 11 = 612 x 792
I need to get these images to the same width (can go as high as 375 pixels wide) so they will display correctly in a flash animation and still be relatively readable.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Converting pdf to jpg
If you want a specific width... just resize the image to that width...
Then just set the output density
You can NOT get set resolution to be correct for a image, and have a specific
width (unless you crop which you don't want). that are antithesis of each other.
Code: Select all
-resize 300x
Code: Select all
-density 72
width (unless you crop which you don't want). that are antithesis of each other.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/