diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2020-08-02 12:43:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-02 12:43:25 +0200 |
| commit | 0f43780c8c50a6d933091056aaa523905f6e7b1a (patch) | |
| tree | a6c193234bbea10ce66c7a59b676f64d00a4cde1 /Jellyfin.Drawing.Skia/SkiaEncoder.cs | |
| parent | 44aca4dc6ff478776ca56c95763b3db7177234f3 (diff) | |
Apply suggestions from code review
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
Diffstat (limited to 'Jellyfin.Drawing.Skia/SkiaEncoder.cs')
| -rw-r--r-- | Jellyfin.Drawing.Skia/SkiaEncoder.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Drawing.Skia/SkiaEncoder.cs b/Jellyfin.Drawing.Skia/SkiaEncoder.cs index 62e1d6ed14..a1caa751b1 100644 --- a/Jellyfin.Drawing.Skia/SkiaEncoder.cs +++ b/Jellyfin.Drawing.Skia/SkiaEncoder.cs @@ -487,7 +487,8 @@ namespace Jellyfin.Drawing.Skia var height = newImageSize.Height; // scale image (the FromImage creates a copy) - using var resizedBitmap = SKBitmap.FromImage(ResizeImage(bitmap, new SKImageInfo(width, height, bitmap.ColorType, bitmap.AlphaType, bitmap.ColorSpace))); + var imageInfo = new SKImageInfo(width, height, bitmap.ColorType, bitmap.AlphaType, bitmap.ColorSpace); + using var resizedBitmap = SKBitmap.FromImage(ResizeImage(bitmap, imageInfo)); // If all we're doing is resizing then we can stop now if (!hasBackgroundColor && !hasForegroundColor && blur == 0 && !hasIndicator) |
