Coalescing bmps into a gif with Magick++

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Zamfir
Posts: 1
Joined: 2011-10-08T18:38:12-07:00
Authentication code: 8675308

Coalescing bmps into a gif with Magick++

Post by Zamfir »

I apologize in advance if this is too simple a question to ask here. I have a simple program in c++ which outputs many bitmap image files and I want to write a for loop which will coalesce them into one gif file. I think I understand that I should be including STL.cpp, and using the coalesceImages algorithm.. but I can't figure out how to write the code.. I've been using http://www.imagemagick.org/Magick++/STL.html for reference

If someone could let me know how to write a for loop which coalesces the bmp files (which have the same dimensions) given an array with their addresses, that would be great.

Thank you!

Zamfir
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Coalescing bmps into a gif with Magick++

Post by anthony »

Code: Select all

convert *.bmp  -layers Optimize file.gif
In the c++ program you will have to link to the MagickCore library, and convert your raw arrays data into BMP images, so that IM can the save it as GIF.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply