Don't decode animated images

This commit is contained in:
Cody Robibero 2024-03-04 17:06:38 -07:00
parent 407cf5d0bf
commit 86b77de522

View file

@ -262,6 +262,11 @@ public class SkiaEncoder : IImageEncoder
return null;
}
if (codec.FrameCount != 0)
{
throw new ArgumentException("Cannot decode images with multiple frames");
}
// create the bitmap
var bitmap = new SKBitmap(codec.Info.Width, codec.Info.Height, !requiresTransparencyHack);