13 October 2010


  • City of Wonder
  • Content Pipeline

6 hours of experimentation, that’s a whole additional day at the end of the day. To say the command-line documentation/interface is obtuse would be an understatement. My first choice, convert -layers optimize -delay 6 -loop 0 *.png straw_hut.gif just seemed to work. All files were smaller than the custom format. Until I noticed some trails that weren’t supposed to be there, the reason, -layers optimize doesn’t write transparency information. That’s where the 6 hours of investigation kicks in, it all seems to lie in the -dispose option, e.g.

convert -dispose Background -delay 6 -loop 0 *.png prem_museum.gif

  • Background, Previous, 630kb, correct background
  • Undefined, None, 630kb, incorrect -deconstruct
  • fails -coalesce * 742kb, incorrect background

My final solution was to emit the frame data with 0xff00ff as the background color to help Imagemagick and choose the -dispose Background option:

convert -transparent "#ff00ff" -layers optimize -dispose Background -delay 6 -loop 0