Apply image quality to ImageResizer

This commit is contained in:
TheXamlGuy
2024-07-26 18:00:49 +01:00
parent d45c6b90ed
commit 745619c66e
+7 -1
View File
@@ -28,8 +28,14 @@ public class ImageResizer :
using SKBitmap resized = new(newWidth, newHeight);
using SKCanvas canvas = new(resized);
using SKPaint paint = new()
{
FilterQuality = SKFilterQuality.High,
IsAntialias = true
};
canvas.Clear(SKColors.Transparent);
canvas.DrawBitmap(sKBitmap, new SKRect(0, 0, newWidth, newHeight));
canvas.DrawBitmap(sKBitmap, new SKRect(0, 0, newWidth, newHeight), paint);
SKBitmap cropped;
if (maintainAspectRatio)