Hello,
You selected "Image paint" option, which is for Draw an image feature. You could refer to the official doc and use the following code:
canvas.DrawImage(image, 10, 10, image.Width, image.Height);// or (image,0,0,240,300) as the sample
This error is related to the canvas.SetFillImage(image.Downsize(100)); method. And it is in ImageExtensions
class. If I remove this line, the error will disappear.
You could report this issue at https://github.com/dotnet/maui-samples/issues, thanks for your collaboration.
Best Regards,
Wenyan Zhang
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.