I've found a few methods of doing this, almost all of which use ImageMagick or GraphicsMagick, callable tools to convert images files into gifs, ffmepgs, mpgs etc.
Most of the examples I've found involve calling the "convert" command (a PATH reference to ImageMagick or GraphicsMagick) within a function of the animation package.
A few of these make use of the saveGIF() function available from the animation library. I like the intuitive nature of this function, but I found that I wasn't able to control the ImageMagick conversion as well as I'd like. Using ImageMagick directly from the command line along with some settings tweaks gave me more nuanced control of the GIF creation.
I followed a process of creating the images first (PNGs created through a controlled loop, see Part 2) then calling ImageMagick's convert function directly from the command line using a command like:
C:\Users\Erich\Documents\Plots\State UNMP>convert -delay 100 *.png "UNMP2012+.gif"
At work I took a slightly different tack, and used a different external conversion program, PhotoScape. THe PhotoScape GUI was easy to use, but not as hack-y as ImageMagick.
Finding the right delay is key; I've found 80ms works well for many charts
No comments:
Post a Comment