Hello,
You could refer to this Xamarin official Image resizer example: ImageResizer.
After my tests, this code works fine in MAUI Android and iOS. For Windows, you need to replace WINDOWS_UWP
with WINDOWS
.
Then, you could call this method in your code in the following ways:
imageData = memoryStream.ToArray();
var resizedImgData = await ImageResizer.ResizeImage(imageData, 300, 300);
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.