diff options
| author | Jake Mannens <jake@asger.xyz> | 2026-06-25 02:22:03 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2026-06-25 02:23:47 +1000 |
| commit | 0f52838f8f983dae4750d824a1ee9a7c250dc914 (patch) | |
| tree | ea1e9ed75ea9f70105c9cd7892e103f4b0674c87 /Services | |
| parent | ce68b92b8e5bfcdb9c36955dbbc7494efc04d7c6 (diff) | |
Fixed issue with thumbnail width and height clamping
Diffstat (limited to 'Services')
| -rw-r--r-- | Services/MediaService.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Services/MediaService.cs b/Services/MediaService.cs index d608cc9..6019f3f 100644 --- a/Services/MediaService.cs +++ b/Services/MediaService.cs @@ -311,10 +311,10 @@ public class MediaService : IMediaService { using var image = new MagickImage(GetPath(mediaId)); - if(width > image.Width || height > image.Height) { + if(width > image.Width) width = (int) image.Width; + if(height > image.Height) height = (int) image.Height; - } image.Thumbnail((uint) (width ?? -1), (uint) (height ?? -1)); image.Write(thumbPath, MagickFormat.Jpeg); |
