You may like to try
-resize 250x9999
Easy crop question??
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
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
If your crop is centered, unstead of calculating the offset just ask IM to do a centered crop...
WARNING:
If you have the posibility of saving to some other image format than JPEG then also add a
+repage after the crop to remove any virtucal canvas and offset information. JPEG format does not save that info, but it may cause problems for formats like PNG, and definateally will cause problems for formats like GIF, which use such info for animation purposes.
Code: Select all
convert filename.jpg -resize 250x9999 -gravity center -crop 250x104+0+0 filename.jpg
If you have the posibility of saving to some other image format than JPEG then also add a
+repage after the crop to remove any virtucal canvas and offset information. JPEG format does not save that info, but it may cause problems for formats like PNG, and definateally will cause problems for formats like GIF, which use such info for animation purposes.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/