RIP APNGs

This commit is contained in:
Natsumi
2025-05-28 03:49:29 +10:00
parent ea748ce1f1
commit 9f45d535a0

View File

@@ -40,16 +40,6 @@ namespace VRCX
using var fileMemoryStream = new MemoryStream(imageData);
var image = Image.Load(fileMemoryStream);
// for APNG, check if image is png format and less than maxSize
if ((!matchingDimensions || image.Width == image.Height) &&
image.Metadata.DecodedImageFormat == PngFormat.Instance &&
imageData.Length < maxSize &&
image.Width <= maxWidth &&
image.Height <= maxHeight)
{
return imageData;
}
if (image.Width > maxWidth)
{
var sizingFactor = image.Width / (double)maxWidth;