aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2024-03-04 17:06:38 -0700
committerCody Robibero <cody@robibe.ro>2024-03-04 17:06:38 -0700
commit86b77de5229c31bfc4ea77a2d0b4b72cfac64c14 (patch)
tree8280367a56f67017e49938efe7e461a05bd80e1c /src
parent407cf5d0bf9d3563ae77fd34ce29ffae5af4339f (diff)
Don't decode animated images
Diffstat (limited to 'src')
-rw-r--r--src/Jellyfin.Drawing.Skia/SkiaEncoder.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs b/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs
index a40719499..92299dd06 100644
--- a/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs
+++ b/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs
@@ -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);