Page 1 of 1

resize an overlay in a gif image

Posted: 2016-10-20T11:55:02-07:00
by alealvaro
Hello!!

Please I need help with something. I have a gif image as a background, and I need to resize an overlay image which is a png.

By cli, I tried:

Code: Select all

convert +dither 600x339-star-wars.gif -coalesce null: ninja-100x100.png -geometry 200x+40+40 -layers composite -layers optimize test2.gif
This command works good if both images png. But when the main image is a gif, it doesn't. The geometry option put the image in the right place, but in it's original size without resize it.
I've been checking http://www.imagemagick.org/script/comma ... p#geometry

Images are:
600x339-star-wars.gif => https://thechive.files.wordpress.com/20 ... .gif?w=600
ninja-100x100.png => https://imagenes.es.sftcdn.net/es/scrn/ ... 00x100.png

I'm using: Version: ImageMagick 6.9.5-5 Q16 x86_64 2016-08-07 http://www.imagemagick.org

Thanks in advance!

Re: resize an overlay in a gif image

Posted: 2016-10-20T13:10:55-07:00
by fmw42
try

Code: Select all

convert 600x339-star-wars.gif -coalesce null: \( ninja-100x100.png -resize 200x -set page +40+40 \) -layers composite -layers optimize test2.gif

Re: resize an overlay in a gif image

Posted: 2016-10-20T14:04:34-07:00
by alealvaro
fmw42 wrote:try

Code: Select all

convert 600x339-star-wars.gif -coalesce null: \( ninja-100x100.png -resize 200x -set page +40+40 \) -layers composite -layers optimize test2.gif
You're a genius! It worked! Thanks a lot!

Re: resize an overlay in a gif image

Posted: 2016-10-20T14:49:18-07:00
by fmw42
-geometry is a setting not an operator. So it won't do anything unless an operator that knows about it follows. In this case, you really needed to do a resize and then a page offset.