how to specify size of images in a composite

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
magick
Site Admin
Posts: 11098
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-02-06T21:12:25-07:00

The -page option sets the virtual page dimensions. It does not change the size of the image. Use the -resize option to resize the image dimensions.

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony » 2006-02-08T18:53:00-07:00

If you want to position an image correctly position it AFTER resizing it

\( bar.png -resize 50x50\! -repage +424+451 \)

Alturnative set a -geometry size and placement for a -composite overlay
however for this you will need to create an initial canvas that -mozaic and
-flatten creates for you automatically.

For more detals of all the methods of overlaying multiple images see
IM Examples, Mosaics
http://www.cit.gu.edu.au/~anthony/graph ... 6/mosaics/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony » 2006-02-16T18:27:20-07:00

It seems that -geomtery is broken, but will be fixed on the next point release
of IM v6.2.6-2

However we have finally decided what -geometry will do to match with the new commandline scheme. Unfortunatally it is such a unusual command it is BOTH a operator and a setting.

As of the next point release, -geometry will be a specialized 'resize' operator. If given a size it will resize just the LAST image in the current image sequence which presumably will be an overlay image for a later -composite.

If it provides position info this will also be saved for later action by -composite.

This unuisual behaviour in convert will make this command act correctly, by only resizing the overlay image (in most cases), as a speciallised compose resize operator.

For more details see
http://www.cit.gu.edu.au/~anthony/graph ... ics/#notes
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony » 2006-02-19T17:01:12-07:00

As I mentioned, once the next point release comes out you will not need the parenthesis for -geometry resize, as it will resize ONLY the last image in the current image sequence, rather than all the images as a normal -resize does.

If you want to may sure -geometry works as expected for all IM v6 versions
use parenthesis as you have done, even if they are not needed. If you do use parenthesis the you can also use the generic -resize operator.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

Post Reply