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)
Mogrify Can't trim/repage
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mogrify Can't trim/repage
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.
see
http://www.imagemagick.org/Usage/basics/#convert
http://www.imagemagick.org/Usage/basics/#mogrify
Code: Select all
convert test.png -trim +repage result.png
http://www.imagemagick.org/Usage/basics/#convert
http://www.imagemagick.org/Usage/basics/#mogrify
Re: Mogrify Can't trim/repage
ok, I tried again with the image as the last argument and it works fine.