Преглед на файлове

Don't decode animated images

Cody Robibero преди 1 година
родител
ревизия
86b77de522
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      src/Jellyfin.Drawing.Skia/SkiaEncoder.cs

+ 5 - 0
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);