How to create self-crossfaded looping gif from image sequence?

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
sgoodrow
Posts: 4
Joined: 2017-01-26T21:57:48-07:00
Authentication code: 1151

How to create self-crossfaded looping gif from image sequence?

Post by sgoodrow »

Hi,

Tried to look this up but... honestly, this program is so robust that there's a sea of information and I couldn't find the right resource. If anyone can just point me in the right direction I'm sure I can figure it out.

Problem:

I have 360 images that I'd like to composite into an animated 6 second .gif (60 FPS). I'd like the gif to loop, but the image sequence is not perfectly seamless. In the last 60 frames, I'd like to fade each out, and fade in the first 60 frames inversely.

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

Re: How to create self-crossfaded looping gif from image sequence?

Post by fmw42 »

see http://www.imagemagick.org/script/comma ... .php#morph

Alternately, if on Unix see my bash shell scripts, fxtransitions and transitions, at my link below.

Please always provide your IM version and OS/platform, since syntax and scripting may differ.
sgoodrow
Posts: 4
Joined: 2017-01-26T21:57:48-07:00
Authentication code: 1151

Re: How to create self-crossfaded looping gif from image sequence?

Post by sgoodrow »

Thank you fmw42. I will do additional reading.

I am using ImageMagick 7.0.4, from the Windows 64 installer, on Windows 10.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to create self-crossfaded looping gif from image sequence?

Post by fmw42 »

See also http://www.imagemagick.org/Usage/anim_mods/#morph

You will have to morph all the frames you want transitioning if the morph is what you want. Then add those to your list of other images before using gif animation commands.

See http://www.imagemagick.org/Usage/anim_basics/

To use my scripts, you would need to use Windows 10 Unix. My scripts only fade between two images at one time.
sgoodrow
Posts: 4
Joined: 2017-01-26T21:57:48-07:00
Authentication code: 1151

Re: How to create self-crossfaded looping gif from image sequence?

Post by sgoodrow »

Great, thanks. I've also just read that .GIFs do not handle alpha transparency, so I may be a little worse off than I thought.

My images are semi-transparent .PNGs and I'd like the result to be semi-transparent as well.

Is there an image/video format that handles alpha transparency?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to create self-crossfaded looping gif from image sequence?

Post by fmw42 »

Gifs handle binary transparency (at any pixel it can perfectly opaque or perfectly transparent). Gifs do not allow 8-bit transparency. There is not good PNG animation that can be viewed conveniently on multiple browsers, that I know about.

You can create your frames as PNG and then convert to an mpeg video. You will need to prepare all the transitions as separate frames. IM calls ffmpeg to create the mpeg video, so you need to have that as an IM delegate compiled with IM. But you may be better off using ffmpeg directly.
sgoodrow
Posts: 4
Joined: 2017-01-26T21:57:48-07:00
Authentication code: 1151

Re: How to create self-crossfaded looping gif from image sequence?

Post by sgoodrow »

Thank you, I will look for a way to convert my semi-transparent PNG frames to an mpeg video. Sorry for the trouble! Feel free to close or archive this thread.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to create self-crossfaded looping gif from image sequence?

Post by snibgo »

sgoodrow wrote:... and I'd like the result to be semi-transparent as well.
I don't think mpeg can handle any transparency. Each frame should be flattened against a background colour before assembling into a video.
snibgo's IM pages: im.snibgo.com
Post Reply