I'm trying to extract thumnail images of each frame in an animated gif. The following code is how I'm tyring to do it, but the thumbnail property of the BitmapFrame instance is always null.
Am I doing something wrong?
GifBitmapDecoder bd1 = new GifBitmapDecoder(
new Uri(thisImage.Path), BitmapCreateOptions.None, BitmapCacheOption.Default);
if (bd1.CheckAccess())
{
if (bd1.Frames.Count > 1)
{
foreach (var frame in bd1.Frames)
{
BitmapSource frameThmb = frame.Thumbnail;
if (frameThmb != null)
Console.WriteLine(frameThmb.Width);
}
}
}