Morph tool, create filler frames of original images

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
Cookizza
Posts: 2
Joined: 2014-02-27T08:20:49-07:00
Authentication code: 6789

Morph tool, create filler frames of original images

Post by Cookizza »

Hey all, I'm hoping to get some help on a script we've put together to process a handful of images into a video.

We are using the -morph command to generate transition images from a handful of base frames and it's working a treat. However we now want it to also duplicate the original frames so the video we create with ffmpeg 'holds' on the main images before running the next transition. I've pasted our command below and any insight on how I'd get IM to do this would be amazing.

It may be worth mentioning we're running this from PHP exec :)

Code: Select all

convert -quality 100 temp/production/images/raw/uid.*.png -delay 2 -morph 12 temp/production/images/processed/uid.%05d.png
Also like to say thanks to this community, I've ended up in various threads finding solutions while we've been developing this app and it's been invaluable. Hopefully I can give back when my IM knowledge is a bit better.

Cheers
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Morph tool, create filler frames of original images

Post by snibgo »

I'm not sure what you are asking. If you want to "freeze" a frame, you can just make a load of copies with appropriate sequence numbers. (I do it with links -- much quicker than physical copies, and takes less disk space.)
snibgo's IM pages: im.snibgo.com
Cookizza
Posts: 2
Joined: 2014-02-27T08:20:49-07:00
Authentication code: 6789

Re: Morph tool, create filler frames of original images

Post by Cookizza »

Hey thanks for the quick reply. Yes that's what I want to achieve. However the images are prenumbered and are sequentially read by ffmpeg - I don't really want to have to loop over and rename all the images, is there a way to do this without ruining the filename structure? That's why I was hoping to be able to have it part of the above convert command, as it's output sequentially numbers the files.

Cheers!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Morph tool, create filler frames of original images

Post by fmw42 »

I am not sure I fully understand but versions v6.6.8-7 or higher of IM you can use -duplicate X to repeat frames in a command line. See
http://www.imagemagick.org/script/comma ... #duplicate
http://www.imagemagick.org/Usage/basics/#duplicate
Post Reply