Page 1 of 1

Mogrify Can't trim/repage

Posted: 2014-06-25T15:27:03-07:00
by timando
I'm using imagemagick that's in Debian Sid. The version reported by imagemagick is: "Version: ImageMagick 6.7.7-10 2014-05-25 Q16 http://www.imagemagick.org".
I created a file - test.png with a rotated rectangle in a large canvas with blank space around it (960x720 rotated 45 degrees in a 1500x1500 canvas if it makes any difference).
When I go "mogrify test.png -trim +repage", it doesn't actually trim the resulting png. There's no problem if I use convert but mogrify doesn't seem to repage it (When I open it in GIMP, it says something about a png offset)

Re: Mogrify Can't trim/repage

Posted: 2014-06-25T16:31:20-07:00
by fmw42
You want to use convert and not mogrify. Your syntax is for convert. Mogrify syntax is quite different and is for processing a whole folder of files with the same command.

Code: Select all

convert test.png -trim +repage result.png
see
http://www.imagemagick.org/Usage/basics/#convert
http://www.imagemagick.org/Usage/basics/#mogrify

Re: Mogrify Can't trim/repage

Posted: 2014-06-25T19:20:27-07:00
by timando
ok, I tried again with the image as the last argument and it works fine.