aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing/GDI/GDIImageEncoder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Drawing/GDI/GDIImageEncoder.cs')
-rw-r--r--Emby.Drawing/GDI/GDIImageEncoder.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Emby.Drawing/GDI/GDIImageEncoder.cs b/Emby.Drawing/GDI/GDIImageEncoder.cs
index 530613741..11c9eb8e9 100644
--- a/Emby.Drawing/GDI/GDIImageEncoder.cs
+++ b/Emby.Drawing/GDI/GDIImageEncoder.cs
@@ -89,7 +89,7 @@ namespace Emby.Drawing.GDI
}
}
- public void EncodeImage(string inputPath, string cacheFilePath, int width, int height, int quality, ImageProcessingOptions options)
+ public void EncodeImage(string inputPath, string cacheFilePath, int width, int height, int quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)
{
var hasPostProcessing = !string.IsNullOrEmpty(options.BackgroundColor) || options.UnplayedCount.HasValue || options.AddPlayedIndicator || options.PercentPlayed > 0;
@@ -98,8 +98,6 @@ namespace Emby.Drawing.GDI
var newWidth = Convert.ToInt32(width);
var newHeight = Convert.ToInt32(height);
- var selectedOutputFormat = options.OutputFormat;
-
// Graphics.FromImage will throw an exception if the PixelFormat is Indexed, so we need to handle that here
// Also, Webp only supports Format32bppArgb and Format32bppRgb
var pixelFormat = selectedOutputFormat == ImageFormat.Webp