Autocropping: image is shifted
Posted: 2010-04-23T08:36:11-07:00
Hello.
I'm trying to autocrop PDF geometric pictures that I created with LaTeX.
I used pdftoppm to convert the PDF to a PNG, then 'convert -trim file.png newfile.png' to crop the PNG.
However, the cropped PNG is shifted down to the right, according to identify and to the Gimp:
$ identify newfile.png
ds2-tikz-1.png PNG 1654x2363 4961x7016+279+154 8-bit PseudoClass 256c 41.3kb
How can I avoid this shift automatically? In Gimp, autocrop adjusts the bounding box of the image, is there a similar function with ImageMagick?
Thanks.
--
F. Delente
I'm trying to autocrop PDF geometric pictures that I created with LaTeX.
I used pdftoppm to convert the PDF to a PNG, then 'convert -trim file.png newfile.png' to crop the PNG.
However, the cropped PNG is shifted down to the right, according to identify and to the Gimp:
$ identify newfile.png
ds2-tikz-1.png PNG 1654x2363 4961x7016+279+154 8-bit PseudoClass 256c 41.3kb
How can I avoid this shift automatically? In Gimp, autocrop adjusts the bounding box of the image, is there a similar function with ImageMagick?
Thanks.
--
F. Delente