From 577c248c7323c099e89699c9508cfbab487d43a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Sua=CC=81rez?= Date: Wed, 23 Nov 2022 11:34:21 +0100 Subject: [PATCH] Fix ObjectDisposedException on Android resizing images --- src/Graphics/src/Graphics/Platforms/Android/PlatformImage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Graphics/src/Graphics/Platforms/Android/PlatformImage.cs b/src/Graphics/src/Graphics/Platforms/Android/PlatformImage.cs index 13c6583bfb65..3126566d5b67 100644 --- a/src/Graphics/src/Graphics/Platforms/Android/PlatformImage.cs +++ b/src/Graphics/src/Graphics/Platforms/Android/PlatformImage.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -33,7 +33,7 @@ public IImage Downsize(float maxWidth, float maxHeight, bool disposeOriginal = f public IImage Resize(float width, float height, ResizeMode resizeMode = ResizeMode.Fit, bool disposeOriginal = false) { - using (var context = new PlatformBitmapExportContext((int)width, (int)height)) + using (var context = new PlatformBitmapExportContext(width: (int)width, height: (int)height, disposeBitmap: disposeOriginal)) { var fx = width / Width; var fy = height / Height;