help with -duplicate feature

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
edavis
Posts: 2
Joined: 2015-06-15T20:24:44-07:00
Authentication code: 6789

help with -duplicate feature

Post by edavis »

I have command below and I have to repeat the -duplicate argument to achieve an effect where each image last 15 frames before it transitions to another image using morph
convert 1.jpg -duplicate 15 2.jpg -duplicate 15 3.jpg -duplicate 15 -delay 0 -morph 6 c:\\test.ppm
when I do
convert 1.jpg 2.jpg 3.jpg -duplicate 15,0-2 -delay 0 -morph 6 c:\\test.ppm
it doesn't work
is there a way to replace the 3 -duplicate arguments with one ?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: help with -duplicate feature

Post by snibgo »

"-duplicate N" copies just the last image, adding N new images. So if you want 15 in total, use "-duplicate 14".

"-morph N" operates on all the images in the current list, adding N interpolated images between each pair.

So if you want 15 static frames, 6 interpolations to the next which is also repeated, and so on, it gets a little messy. For example: generate the morphs first, then generate the duplicates, then use "-insert" or "-swap" to get them in the right order.
snibgo's IM pages: im.snibgo.com
Post Reply