Can anyone point me towards an app that will do it for me? I've been searching for a while now and haven't been able to find anything
Thanks for any help




Posted 05 February 2012 - 06:28 AM
Posted 05 February 2012 - 07:21 AM
public static IEnumerable<Bitmap> GetImages(Stream stream)
{
using (var gifImage = Image.FromStream(stream))
{
var dimension = new FrameDimension(gifImage.FrameDimensionsList[0]); //gets the GUID
var frameCount = gifImage.GetFrameCount(dimension); //total frames in the animation
for (var index = 0; index < frameCount; index++)
{
gifImage.SelectActiveFrame(dimension, index); //find the frame
yield return (Bitmap) gifImage.Clone(); //return a copy of it
}
}
}
This post has been edited by Sergio Tapia: 05 February 2012 - 07:23 AM
