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?".
I want to combine two images, both of them have different sizes. I want to define an are before overlaying one image on the other while resizing the second one. See the following example:
I am doing another run after that to draw that exact rectangle I want to place the overlay into. I want that image to be centered depending on its dimensions. Shouldn't the geometry setting be able to resize my picture and center it at the same time?
it will be totally off, I want to keep the original dimensions from my-shirt.jpg and just put a resized version of logo-test.png on top of it on a defined area.
Put the -resize before -gravity (right after your second image) and with parens for the second image. Otherwise you will resize both images.. Your -geometry is probably not needed if you have -gravity center. If it is needed, then it will need much smaller +X+Y values. Start with +0+0 and then adjust as needed.
This will scale the logo in the sub routine and I just used -extent to get it to center in the whole rectangular area needed, after that I just put the result onto the jpg.