Hi,
Does anyone know how to create an animated gif using c#? Ideally I would have some control over the color reduction used.
Is using imagemagick (as an external started process) the best choice?
thanks!
Hi,
Does anyone know how to create an animated gif using c#? Ideally I would have some control over the color reduction used.
Is using imagemagick (as an external started process) the best choice?
thanks!
Whether or not calling imagemagick is the best choice is kind of hard to awnser without knowing the quality parameters that are important. Some other options would be:
these have the advantage that you don't have a dependency on a third partly library which might or might not be available on all systems executing your code.
This article at MS Support explains how to save a gif with a custom color table (this does require full trust). A animated gif is just a set of gifs for each image with some additional information in the header. So combining these two articles should get you what you need.
Here are links to two tutorials, one includes a nice little encoder:
http://bloggingabout.net/blogs/rick/archive/2005/05/10/3830.aspx
http://www.codeproject.com/KB/GDI-plus/NGif.aspx
hope this helps