-size is for creating images, you need -resize
see
http://www.imagemagick.org/script/comma ... php#resize
http://www.imagemagick.org/Usage/resize/
convert \( image1 -resize ... \) \( image2 -resize ... \) -flatten output
flatten and resize
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: flatten and resize
-size has a side effect with JPEG reading to get the library to reduce the amount of image reading an processing it does. For Image file formats it only effects JPEG. (ASIDE: -page effects postscript, PDF and text generated images).
However -size with JPEG does not resize the image to the size given, instead it reads enough to generate an image of aleast that size. As such a -size 200x100 photo.jpg will return an image that is at least 200x100 pixels (if posible) but more likely to be larger.
See IM Examples, JPEG reading controls...
http://www.imagemagick.org/Usage/formats/#jpg_read
And Thumbnails, JPEG Handling...
http://www.imagemagick.org/Usage/thumbnails/#profiles
And Montage Image Indexs...
http://www.imagemagick.org/Usage/montage/#index
So what you want is a -size about double the final size, while reading in images, then a -resize (with appropriate flags) to resize the images to fit the 'box size' specified.
However -size with JPEG does not resize the image to the size given, instead it reads enough to generate an image of aleast that size. As such a -size 200x100 photo.jpg will return an image that is at least 200x100 pixels (if posible) but more likely to be larger.
See IM Examples, JPEG reading controls...
http://www.imagemagick.org/Usage/formats/#jpg_read
And Thumbnails, JPEG Handling...
http://www.imagemagick.org/Usage/thumbnails/#profiles
And Montage Image Indexs...
http://www.imagemagick.org/Usage/montage/#index
So what you want is a -size about double the final size, while reading in images, then a -resize (with appropriate flags) to resize the images to fit the 'box size' specified.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/