See 'Padding out an image' in IM Examples, Resize
http://www.cit.gu.edu.au/~anthony/graph ... space_fill
Also more details examples of 'padding' in given in Thumbnails..
http://www.cit.gu.edu.au/~anthony/graph ... nails/#pad
How to re-size canvas to a fixed aspect ratio ?
- 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
For your case where you are actually changing aspect ratios, probably.
but if your images are all the same size you only need to compute this once.
Note -border may not be the right solution as it always adds two pixels each time,
one on each side of the image. This was a problem that was looked at in an answer to someone designing CD covers, and also needed padding.
Specific sized images, without resize
http://www.cit.gu.edu.au/~anthony/graph ... /#cd_cover
This will ne merged into some other section at some point in the distant future.
but if your images are all the same size you only need to compute this once.
Note -border may not be the right solution as it always adds two pixels each time,
one on each side of the image. This was a problem that was looked at in an answer to someone designing CD covers, and also needed padding.
Specific sized images, without resize
http://www.cit.gu.edu.au/~anthony/graph ... /#cd_cover
This will ne merged into some other section at some point in the distant future.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/