mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-27 04:16:47 +00:00
reduce image processing
This commit is contained in:
parent
7d7f9d7654
commit
81bb469fe1
14 changed files with 139 additions and 443 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue