I'm trying to convert a PDF file to images on the fly using imagemagick from command line. These PDFs are in very high definition and I would like to get correlated images (JPG).
Usually used Gimp, when I convert these PDF to 600dpi under this software the quality is super top. But I do not see myself convert more than 500 images one by one with Gimp ... that's why I turn to ImageMagick, especially since converting image files on the fly happens to me more and more often, I would like to master this type of tool.
Alas, with ImageMagick, by default I get very small images (type 468x705), despite the setting of a density at 600dpi:
convert *.pdf -density 600 -quality 100 *.jpg
So I added a resize
command (I also tried scale
), the image is much higher definition (type 4680x7050), but is pixelated as if I had remained at the default definition:
convert *.pdf -resize 1000% -density 600 -quality 100 *.jpg
I even thought it could come from the order of orders, but that does not change anything:
convert *.pdf -density 600 -resize 1000% -quality 100 *.jpg
An idea ?
Subsidiary (but less crucial) question: how to keep the same name for the destination file as the original one?
EDIT : In addition to the for loop proposed by Mark Setchell I just discovered that you can use mogrify
. Example:
mogrify -format jpg -density 600 -blur 1x1 -quality 100 *.pdf