mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
Add image export in WebP format
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.Formats.Bmp;
|
||||
using SixLabors.ImageSharp.Formats.Tga;
|
||||
using SixLabors.ImageSharp.Formats.Webp;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using System;
|
||||
using System.IO;
|
||||
@ -34,6 +35,13 @@ namespace AssetStudio
|
||||
Compression = TgaCompression.None
|
||||
});
|
||||
break;
|
||||
case ImageFormat.Webp:
|
||||
image.Save(stream, new WebpEncoder
|
||||
{
|
||||
FileFormat = WebpFileFormatType.Lossless,
|
||||
Quality = 50
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
Jpeg,
|
||||
Png,
|
||||
Bmp,
|
||||
Tga
|
||||
Tga,
|
||||
Webp,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user