Merge pull request #11109 from crobibero/animated-webp

Don't decode animated images
This commit is contained in:
Bond-009 2024-04-14 15:54:48 +02:00 committed by GitHub
commit 9818456d9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -263,6 +263,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);