title: How to make an animated gif loop twice in imagemagick?
body: <p>I need to make an animated gif that plays all of its frames twice before stopping. It might seem like a simple thing to do, but for some reason when I set the -loop flag to 2, it plays three times, whereas when I set it to 1, it plays only once. so:</p>
  
  <pre><code>#this will play once then stop
  convert -size 300x600 -delay 50 frame1.png  -delay 50 frame2.png -loop 1 animation.gif;
  
  #this will play three times then stop
  convert -size 300x600 -delay 50 frame1.png  -delay 50 frame2.png -loop 2 animation.gif;
  </code></pre>
  
  <p>How to make it play twice?</p>