Mark Dodwell on wrote... | Hi, | | I'm using magick to create an image of the first page of a PDF | document. I use the following command: | | convert -resize 150x -crop 150x150! -gravity center -strip -colors | 128 -resample 72x +repage 'file.pdf'[0] 'file.gif' | | This has worked perfectly for me apart from 1 exception. For one PDF, | I end up with an animated gif containing two frames. So, it seems to | be ignoring the [0] part? | | In the animated GIF - the first frame is correct, but the second is | the part of the image that did not make it inside the crop region | specified. | | Any ideas? | YEs. Your crop is a tile croping. It can generte multiple images, unless you specify a offset!!!
use... -crop 150x150+0+0! Also all your settings are out of order. I am sure you want to center your crop, so why is the gravity setting after the crop. Read your image first and order your option in the order you want. And finally -resample is a resize operator! and does nothing as the default saming is 72 dpi! See http://imagemagick.org/Usage/resize/#resample convert 'file.pdf'[0] -strip -resize 150x \ -gravity center -crop 150x150+0+0 +repage \ -colors 128 'file.gif' Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- Anyone who slaps a 'This page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee, 1996 ----------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ _______________________________________________ Magick-developers mailing list Magick-developers@imagemagick.org http://studio.imagemagick.org/mailman/listinfo/magick-developers