mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
3.0.5416.0
This commit is contained in:
@@ -213,7 +213,7 @@ namespace MediaBrowser.Server.Implementations.Drawing
|
||||
var newHeight = Convert.ToInt32(newSize.Height);
|
||||
|
||||
var selectedOutputFormat = options.OutputFormat == ImageOutputFormat.Webp && !_webpAvailable
|
||||
? ImageOutputFormat.Png
|
||||
? GetFallbackImageFormat(originalImagePath)
|
||||
: options.OutputFormat;
|
||||
|
||||
// Graphics.FromImage will throw an exception if the PixelFormat is Indexed, so we need to handle that here
|
||||
@@ -279,6 +279,11 @@ namespace MediaBrowser.Server.Implementations.Drawing
|
||||
}
|
||||
}
|
||||
|
||||
private ImageOutputFormat GetFallbackImageFormat(string originalImagePath)
|
||||
{
|
||||
return ImageOutputFormat.Png;
|
||||
}
|
||||
|
||||
private void SaveToWebP(Bitmap thumbnail, Stream toStream, int quality)
|
||||
{
|
||||
new SimpleEncoder().Encode(thumbnail, toStream, quality);
|
||||
|
||||
Reference in New Issue
Block a user