diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-08-09 23:02:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-09 23:02:22 +0200 |
| commit | f2b87c09542aa186eed00379d03c462adb2c057e (patch) | |
| tree | 411c957ca8e996893842e2bfc01c0c29752b3113 | |
| parent | 023f52362dd6982ecef1ccd66ef5aa19f547b48a (diff) | |
| parent | 1dcc678a6afef4075c264968708eb1b837a0d409 (diff) | |
Merge pull request #3860 from cvium/fix_collages
Fix collages
| -rw-r--r-- | Jellyfin.Drawing.Skia/StripCollageBuilder.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Drawing.Skia/StripCollageBuilder.cs b/Jellyfin.Drawing.Skia/StripCollageBuilder.cs index b08c3750d..10bb59648 100644 --- a/Jellyfin.Drawing.Skia/StripCollageBuilder.cs +++ b/Jellyfin.Drawing.Skia/StripCollageBuilder.cs @@ -115,7 +115,7 @@ namespace Jellyfin.Drawing.Skia // resize to the same aspect as the original int iWidth = Math.Abs(iHeight * currentBitmap.Width / currentBitmap.Height); - using var resizedImage = SkiaEncoder.ResizeImage(bitmap, new SKImageInfo(iWidth, iHeight, currentBitmap.ColorType, currentBitmap.AlphaType, currentBitmap.ColorSpace)); + using var resizedImage = SkiaEncoder.ResizeImage(currentBitmap, new SKImageInfo(iWidth, iHeight, currentBitmap.ColorType, currentBitmap.AlphaType, currentBitmap.ColorSpace)); // crop image int ix = Math.Abs((iWidth - iSlice) / 2); @@ -177,7 +177,7 @@ namespace Jellyfin.Drawing.Skia // Scale image. The FromBitmap creates a copy var imageInfo = new SKImageInfo(cellWidth, cellHeight, currentBitmap.ColorType, currentBitmap.AlphaType, currentBitmap.ColorSpace); - using var resizedBitmap = SKBitmap.FromImage(SkiaEncoder.ResizeImage(bitmap, imageInfo)); + using var resizedBitmap = SKBitmap.FromImage(SkiaEncoder.ResizeImage(currentBitmap, imageInfo)); // draw this image into the strip at the next position var xPos = x * cellWidth; |
