Skip to content

Commit

Permalink
Fix ObjectDisposedException on Android resizing images (#11960)
Browse files Browse the repository at this point in the history
Co-authored-by: Javier Suárez <[email protected]>
  • Loading branch information
github-actions[bot] and jsuarezruiz authored Dec 8, 2022
1 parent 1f9ec33 commit 12ab367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Graphics/src/Graphics/Platforms/Android/PlatformImage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 12ab367

Please sign in to comment.