funkyavocado wrote:I have a series of images that I want to convert to an animated gif that plays forwards and backwards. In the process I also want to resize and crop them. I'd like the animated gif to have a watermark.
I'm using "ImageMagick 6.9.3-1 Q16 x64" on Windows 7 64, so for my test I transposed your backslashes to carets for the escape and continued line character. It should work just the same with your backslashes. So taking your first example pretty much exactly as you wrote it...
Code: Select all
convert c:\sourceImages\*.jpg -resize "600x400^" -gravity center -crop 600x400+0+0 +repage \
-coalesce -duplicate 1,-2-1 -set delay 1 -set dispose previous -layers OptimizePlus -quiet \
-loop 0 c:\finalImages\final.gif
... and adding a line between "+repage" and "-coalesce" like this...
Code: Select all
convert c:\sourceImages\*.jpg -resize "600x400^" -gravity center -crop 600x400+0+0 +repage \
null: \( watermark.jpg -resize 64x64 \) -gravity southeast -geometry +20+20 -layers composite \
-coalesce -duplicate 1,-2-1 -set delay 1 -set dispose previous -layers OptimizePlus -quiet \
-loop 0 c:\finalImages\final.gif
I get a slide show with a 64x64 version of watermark.jpg at +20+20 from the bottom right corner on every slide.
The "null:" separates the list of images already in the stack from the list of images (a single image in this case) in the watermark stack.
The "( watermark.jpg -resize 64x64 )" brings the watermark image into the command and sizes it as needed.
The "-gravity southeast" prepares the watermark composite to work from the lower right corner.
The "-geometry +20+20" defines the location for the watermark at 20 pixels up and left from the corner.
The "-layers composite" adds the watermark.jpg to the corner of each JPG.
Then it continues with your original command just as you wrote it.