diff options
| author | Bond-009 <bond.009@outlook.com> | 2026-05-21 21:33:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-21 21:33:31 +0200 |
| commit | e2fe5c163ae7ca12e862df70fb8d6caa14e86ef2 (patch) | |
| tree | bc3e3ba05ddf069a6a103a81e1e70d5ee8cf392c /src/Jellyfin.Drawing.Skia/SkiaEncoder.cs | |
| parent | bc8a66a35174acad9aca983d5fd311f5070b83a3 (diff) | |
| parent | 0ef4f86ed7bdfde86046fb8ac694892e8206447e (diff) | |
Merge pull request #15250 from jakobkukla/ci-format
Add CI format check
Diffstat (limited to 'src/Jellyfin.Drawing.Skia/SkiaEncoder.cs')
| -rw-r--r-- | src/Jellyfin.Drawing.Skia/SkiaEncoder.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs b/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs index 3f7ae4d2cd..b6d2914efa 100644 --- a/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs +++ b/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs @@ -234,20 +234,20 @@ public class SkiaEncoder : IImageEncoder return default; default: - { - var boundsInfo = SKBitmap.DecodeBounds(safePath); - if (boundsInfo.Width > 0 && boundsInfo.Height > 0) { - return new ImageDimensions(boundsInfo.Width, boundsInfo.Height); + var boundsInfo = SKBitmap.DecodeBounds(safePath); + if (boundsInfo.Width > 0 && boundsInfo.Height > 0) + { + return new ImageDimensions(boundsInfo.Width, boundsInfo.Height); + } + + _logger.LogWarning( + "Unable to determine image dimensions for {FilePath}: {SkCodecResult}", + path, + result); + + return default; } - - _logger.LogWarning( - "Unable to determine image dimensions for {FilePath}: {SkCodecResult}", - path, - result); - - return default; - } } } finally @@ -398,7 +398,7 @@ public class SkiaEncoder : IImageEncoder try { - // If we have to resize these they often end up distorted + // If we have to resize these they often end up distorted if (resultBitmap.ColorType == SKColorType.Gray8) { using (resultBitmap) |
