There're a couple posts regarding gifs... Here's a solution that I ended up using to extract gif frames using Magick++ http://www.imagemagick.org/Magick++/
The easiest way to do this is:
- Download Magick++ pre built binaries for your system.
- Add the neccesary linker flags and include dirs to your project.
-
#include <Magick++.h>
<pre>Magick::Blob blob (yourImage.getData(), yourImage.getSize());
list <Magick::Image> imageList;
Magick::readImages (&imageList, blob);for (auto image : imageList) {
Magick::Blob blob;image.write (&blob, "jpeg"); // Now load up the data from the blob for each frame using JUCE ImageFileFormat...}
That's pretty much it. As far as animating... You can roll a Component that accepts a list of images and do some sort of timer based redraw.
