Why the loop command for making a short animation from images is not displaying correctly?

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
Chemist116
Posts: 7
Joined: 2017-05-31T09:28:04-07:00
Authentication code: 1151

Why the loop command for making a short animation from images is not displaying correctly?

Post by Chemist116 »

Hello. I'm trying to make a gif from a set of three different images and the command I'm using is:

Code: Select all

convert -loop 0 -delay 100 image1.png image2.png image3.png out.gif
However the result does not display correctly as it only shows the first and the last image in the sequence, the second which is in between is missing. What am I doing wrong?

I'm using imagemagick for windows (I'm on windows 7). :(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Why the loop command for making a short animation from images is not displaying correctly?

Post by fmw42 »

try putting -loop 0 at the end before the output.

Code: Select all

convert -delay 100 image1.png image2.png image3.png -loop 0 out.gif
If that does not work, then post your images to some free hosting service and put the URLs here. Also provide your exact IM 7 version as 7.x.x.x.
Chemist116
Posts: 7
Joined: 2017-05-31T09:28:04-07:00
Authentication code: 1151

Re: Why the loop command for making a short animation from images is not displaying correctly?

Post by Chemist116 »

fmw42 wrote: 2018-07-12T14:55:07-07:00 try putting -loop 0 at the end before the output.

Code: Select all

convert -delay 100 image1.png image2.png image3.png -loop 0 out.gif
If that does not work, then post your images to some free hosting service and put the URLs here. Also provide your exact IM 7 version as 7.x.x.x.
Concerning to the version I used this command

Code: Select all

convert -version
and the following was displayed

Code: Select all

C:\Users\Flor>convert -version
Version: ImageMagick 6.9.3-2 Q16 x86 2016-01-23 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangoca
iro png ps rsvg tiff webp xml zlib 
About the images these were:

Image Image Image Image Image

Then when I tried the command already described the result was this:

Code: Select all

convert -delay 100 image1.png image2.png image3.png image4.png image5.png -loop 0 out.gif
Image

But I don't know why does it make a difference with the command loop at beginning or the end. Is there an alternative?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Why the loop command for making a short animation from images is not displaying correctly?

Post by fmw42 »

Order of settings before operators is important in Imagemagick and more so in IM 7. See http://www.imagemagick.org/Usage/basics/#syntax
Post Reply