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?".
agriz
Posts: 237 Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308
Post
by agriz » 2016-09-08T09:54:55-07:00
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
Alien.gif
planet.gif
output.gif
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
Why the first command is not working. How to make it work?
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-09-08T10:17:46-07:00
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.