Watermarking an animated GIF with varied frame offsets and sizes
Posted: 2017-01-13T03:41:39-07:00
I'm using ImageMagick 6.9.0-10 Q16 x64 2015-02-28 on Windows 8.1 via the command line.
I want to watermark multiple animated GIFs at once.
The GIFs canvas is always exactly 320px wide, but height wildly varies between 100px and 1200px. GIFs have varied frame sizes and varied offsets.
The watermark is huge and needs to be resized to fit the GIF.
This is what I've done so far:
And it made the watermark jump all over the place (probably due to frame offsets?):
1) How can I overlay the watermark relative to the canvas instead to each individual frame?
2) Is it possible to resize the watermark based on the GIF's height? E.g. larger watermark on larger GIFs and vice versa.
Files:
big_watermark.png: http://i.imgur.com/OZtDB5e.png
source.gif: http://i.imgur.com/OG5YM3C.gif
P.S.: I've managed to solve my first problem with `convert` but I'd love a IM one-liner to batch process all these GIFs with watermark resizing relative to source height.
My solution:
Result (working as intended): http://i.imgur.com/OjGd9Ab.gif
Thanks!
I want to watermark multiple animated GIFs at once.
The GIFs canvas is always exactly 320px wide, but height wildly varies between 100px and 1200px. GIFs have varied frame sizes and varied offsets.
The watermark is huge and needs to be resized to fit the GIF.
This is what I've done so far:
Code: Select all
mogrify.exe -coalesce -draw "image Over 5,5 184,64 'big_watermark.png'" -layers Optimize *.gif
1) How can I overlay the watermark relative to the canvas instead to each individual frame?
2) Is it possible to resize the watermark based on the GIF's height? E.g. larger watermark on larger GIFs and vice versa.
Files:
big_watermark.png: http://i.imgur.com/OZtDB5e.png
source.gif: http://i.imgur.com/OG5YM3C.gif
P.S.: I've managed to solve my first problem with `convert` but I'd love a IM one-liner to batch process all these GIFs with watermark resizing relative to source height.
My solution:
Code: Select all
convert.exe source.gif -coalesce -draw "image Over 5,5 184,64 'big_watermark.png'" -layers Optimize output.gif
Thanks!