Creating animated GIFs using Magick++/MagickCore APIs
Posted: 2010-03-10T01:08:17-07:00
Hi,
I want to create an animated gif from some in memory data. I am trying to implement this in a VC++ 2005.
I am able to compile the solution provided with the IM Windows release and execute the IMDisplay utility for reading image files.
I have prepared a test solution in which I wrote similar code as the IMDisplay utility to read image files. This is working fine.
Now I want to write data into multiple frames in memory and then write those frames to a single animated gif file. I am not sure of how to go about this.
Most of the documentation is related to the command line utilities. I went through the documentation for Magick++ briefly. I am aware that I can write to gif file by using Image::write(filename). However this creates a non-animated gif file. I could not find any API which helps create an animated GIF file with multiple frames.
Can someone point me out the appropriate Magick++ API which I should use to create an animated gif file?
I went through the documentation for MagickCore too and there a few APIs, viz. NewImageList, AppendImageToList. Are these what I should use for my problem? It would help if someone could point me to some sample code available. I would prefer to use the Magick++ api, though.
thanks in advance,
Abhi
I want to create an animated gif from some in memory data. I am trying to implement this in a VC++ 2005.
I am able to compile the solution provided with the IM Windows release and execute the IMDisplay utility for reading image files.
I have prepared a test solution in which I wrote similar code as the IMDisplay utility to read image files. This is working fine.
Now I want to write data into multiple frames in memory and then write those frames to a single animated gif file. I am not sure of how to go about this.
Most of the documentation is related to the command line utilities. I went through the documentation for Magick++ briefly. I am aware that I can write to gif file by using Image::write(filename). However this creates a non-animated gif file. I could not find any API which helps create an animated GIF file with multiple frames.
Can someone point me out the appropriate Magick++ API which I should use to create an animated gif file?
I went through the documentation for MagickCore too and there a few APIs, viz. NewImageList, AppendImageToList. Are these what I should use for my problem? It would help if someone could point me to some sample code available. I would prefer to use the Magick++ api, though.
thanks in advance,
Abhi