user2145312
user2145312

Reputation: 928

transition between multiple images with ImageMagick with transitions

I am new to ImageMagick, and would naively like to find a command that I can run to create a slideshow from a number of jpeg images with the same fade transition between all images.

I have looked on a number of tutorials / forums, but have only been able to find examples of transitions between 2 images, not 3, 4, or 5 images etc.

I have 5 images (01.jspeg, 02.jpeg, 03.jpeg...etc) that I would like to turn into a slideshow. I would like the slideshow to have the same fade transition between each image. I tried the command line below but it is not behaving as expected!

convert  01.jpeg 02.jpeg 03.jpeg 04.jpeg 05.jpeg -loop 0 morph 9 -set delay "%[fx:(t>0&&t<n-1)?10:320]" output.gif

My presumption of the above code is that a gif would be created of a slideshow of the 5 images with a fade transition between each. but this is not the resulting behaviour.

I am an experienced developer but have no eperience of ImageMagick.

Could someone please let me know what I am misunderstanding about the way that ImageMagic works! Thanks!

I am assuming tha the morph argument provided is applied to all transitions... is this not correct?

Upvotes: 0

Views: 2778

Answers (1)

fmw42
fmw42

Reputation: 53154

I am not sure what you are trying to do with your delay. Perhaps you can explain. But it is not uniform. Many animated gif viewers will not handle delays that change. They works best of a one given delay.

This works fine for me to do a uniform delay using ImageMagick 6.9.10.34 Q16 Mac OSX and viewing it in Safari.

Images:

enter image description here

enter image description here

enter image description here

convert -delay 50 lena.jpg mandril3.jpg zelda1.jpg -morph 9 -loop 0 test.gif


enter image description here

This is what I get from your delay, which starts very slowly and then ends very quickly. Note I put the -set delay right after reading the input and before the -morph. Does that work the way you want in your command?

convert lena.jpg mandril3.jpg zelda1.jpg -set delay "%[fx:(t>0&&t<n-1)?10:320]" -morph 9 -loop 0 test2.gif


enter image description here

Upvotes: 7

Related Questions