Mogrify Can't trim/repage

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
timando
Posts: 2
Joined: 2014-06-25T15:09:23-07:00
Authentication code: 6789

Mogrify Can't trim/repage

Post 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)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Mogrify Can't trim/repage

Post 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
timando
Posts: 2
Joined: 2014-06-25T15:09:23-07:00
Authentication code: 6789

Re: Mogrify Can't trim/repage

Post by timando »

ok, I tried again with the image as the last argument and it works fine.
Post Reply