0

I'm using ImageMagick from the command line to convert pdf to image

convert -density 300x300 -resize 800x600 -quality 85 1.pdf[1,2,3] ZIEL.jpg

However, I don't know the result of this operation.this command has nothing output,can anyone know how to get result of convert?

tfzxyinhao
  • 334
  • 5
  • 19
  • Because JPEG is a single-image format, the output should be the images ZIEL-0.jpg, ZIEL-1.jpg, and ZIEL-2.jpg. – Glenn Randers-Pehrson Jul 09 '14 at 00:53
  • @GlennRanders-Pehrson because of this command was called by other script, so i need to get result of convert from output. how to get result string like "ZIEL-0.jpg, ZIEL-1.jpg, and ZIEL-2.jpg"? when call this command again the output should be "ZIEL-1-0.jpg, ZIEL-1-1.jpg, and ZIEL-1-2.jpg",so walk output directory for get convert result is incorrect way. – tfzxyinhao Jul 09 '14 at 10:55

1 Answers1

2

You can use convert's "-verbose" option to see what is happening:

convert -verbose -density 300x300 -resize 800x600 -quality 85 logo: logo: ZIEL.jpg
LOGO GIF 640x480 640x480+0+0 8-bit sRGB 256c 28.6KB 0.020u 0:00.019
logo:=>LOGO GIF 640x480 640x480+0+0 8-bit sRGB 256c 28.6KB 0.000u 0:00.000
LOGO GIF 640x480 640x480+0+0 8-bit sRGB 256c 28.6KB 0.020u 0:00.029
logo:=>LOGO GIF 640x480 640x480+0+0 8-bit sRGB 256c 28.6KB 0.000u 0:00.000
logo:=>ZIEL-0.jpg[0] GIF 640x480=>800x600 800x600+0+0 8-bit sRGB 42KB 0.340u 0:00.330
logo:=>ZIEL-1.jpg[1] GIF 640x480=>800x600 800x600+0+0 8-bit sRGB 42KB 0.210u 0:00.210

Because JPEG is a single-image format, the output is in separate images ZIEL-0.jpg, ZIEL-1.jpg, etc.

Glenn Randers-Pehrson
  • 11,940
  • 3
  • 37
  • 61