title: How to create an animated gif image from a number of png images?
body: <p>I have an image file "image.png" that I wanted to create a .gif image of out of it.
  I wrote a small script to get 100 images of different sizes (1% - 100%) of the that image, then I removed the original image (image.png) from the containing folder, and used this command to generate the gif image I wanted:</p>
  
  <pre><code>convert -delay 10 -loop 0 *.png image.gif
  </code></pre>
  
  <p>When I checked the gif image, I could see the largest image (100% size) as a still picture (to my eyes) and the smaller images started to show up at the upper left corner of the image, from 1% - 100%, with the 100% image coinciding with the original picture that's always shown up.
  I expected to see the image grow up in size from the center of the rectangular/square are in the image software (gthumb) I use, which is not what I get?</p>
  
  <p>I checked the smaller images, and they are fine, and I also ran a slide show of the images with a high speed and showed me what I expected to have in my gif file. I use Linux.</p>
  
  <p>Update 1:
  Here is the script I used to generate the 100 images, before 'Mark Setchell' reply:</p>
  
  <pre><code>#!/bin/bash
  for i in {1..100};
  do
  if [ $i -lt 10 ]; then
  convert -resize $i% lena.png 00$i.png
  elif [ $i -lt 100 ]; then
  convert -resize $i% lena.png 0$i.png
  else
  convert -resize $i% lena.png $i.png
  fi
  done
  </code></pre>
  
  <p>which produced the 100 images.
  Then as per 'Mark Setchell' reply, I used this code:</p>
  
  <pre><code>for ((i=0;i&lt;100;i++)) ; do
     convert checked-box.png -resize $i% -background none -gravity center -extent 512x512 miff:-
  done | convert miff:- -delay 80 anim.gif
  </code></pre>
  
  <p><a href="https://drive.google.com/open?id=1IxvqGR9QXoYlG5jQry9whlyE-c4mQd81" rel="nofollow noreferrer">here</a> is the result I got.
  And this is <a href="https://drive.google.com/open?id=1PH9H7lNB3Zf5i_MikCVoyi-T0G-DnFNI" rel="nofollow noreferrer">lena.png</a> that I used.</p>
  
  <p>Update 2:</p>
  
  <p>I edited the following command to change the input file name.</p>
  
  <pre><code>for ((i=0;i&lt;100;i++)) ; do
         convert lena.png -resize $i% -background none -gravity center -extent 512x512 miff:-
      done | convert miff:- -delay 80 anim.gif
  </code></pre>