Hello
We have an old version of imagemagick on our server ( 5.5.6) that we can't easily update, and would like to use the following command:
/usr/bin/mogrify -resize x200 -resize '200x' -resize 50% -gravity center -crop 100x100+0+0 +repage "/path/to/image.jpg"
However, we get "/usr/bin/mogrify: Unrecognized option (+repage)"
We've tried it without the repage option and the cropping seems to work fine, but this repage option is apparently sometimes required to "remove virtual canvas layering information". I've no idea what that means and haven't been able to find any information to clarify what it does
Is it necessary?
Thanks very much
Regards
Rupert
cropping and centering without repage
Re: cropping and centering without repage
Take a look:
http://www.imagemagick.org/Usage/crop/#crop
As you can see, no it's not needed if you are just wanting to crop an image.
Just out of curiosity though, what's up with the three -resizes?
http://www.imagemagick.org/Usage/crop/#crop
As you can see, no it's not needed if you are just wanting to crop an image.
Just out of curiosity though, what's up with the three -resizes?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: cropping and centering without repage
You are in luck. JPG does not understand and thus does not save save virtual-canvas information.pagedev wrote:/usr/bin/mogrify -resize x200 -resize '200x' -resize 50% -gravity center -crop 100x100+0+0 +repage "/path/to/image.jpg"
So just save to JPG.
Other with you would need to use "-page +0+0" for things like GIF which does understand page offsets.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: cropping and centering without repage
Ditto! Doing a resize three times creates three times the artifacts (functional errors).immortal26 wrote:Just out of curiosity though, what's up with the three -resizes?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/