Gif, static and dstover not working for me

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
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Gif, static and dstover not working for me

Post by agriz »

Code: Select all


convert -delay 20 space.gif -coalesce -layers OptimizePlus null: \( alien.gif  planet.gif -gravity center -compose DstOver -composite \) -loop 0 -layers composite output.gif

IM 7.0.2

space.gif
Image
Alien.gif
Image
planet.gif
Image

output.gif
Image

But if i swap the images alien and planet, and use composite over, it is working.

Code: Select all

convert -delay 20 space.gif -coalesce -layers OptimizePlus null: \( alien.gif  planet.gif +swap -gravity center -compose Over -composite \) -loop 0 -layers composite output.gif
output.gif
Image

Why the first command is not working. How to make it work?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Gif, static and dstover not working for me

Post by fmw42 »

try resetting the -compose to over before the -layers composite. the -compose dstover setting is carrying over to the -layers composite

Code: Select all

convert -delay 20 space.gif -coalesce -layers OptimizePlus null: \( alien.gif  planet.gif -gravity center -compose DstOver -composite \) -loop 0 -compose over -layers composite output.gif
Probably a good idea to always set the -compose over before -layers composite to be safe.
Post Reply