maui
maui copied to clipboard
Image is not rendering correctly with `Aspect` property other than `Center`
Description
Image control is not rendering correctly when the Aspect property is set to fit in the WidthRequest and HeighRequest.
This is the image on how it must be rendered:
and it is displayed like this:

Any option I choose, other than Center will pixelate the image, is not so clearly.
More than that, if you change the Aspect property while app is running to Center and back to your old value (AspectFill, AspectFit or Fill) the image will look different than its initial displaying.
Steps to Reproduce
- Create a MAUI project.
- Create a custom
ContentViewand add an Image to the control. - Set the image to some
WidthRequestandHeighRequestsmaller than original image file dimensions. - Add the custom control to a page and run the app.
- Look at image on how it is displayed (rendered) and change the
Aspectproperty ofImagetoCenterand then to other value. It will look different than initial display when app starts.

Link to public reproduction project repository
https://github.com/valimaties/TestMAUI
Version with bug
7.0 Release Candidate 2
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows SDK 10.0.19041.0
Did you find any workaround?
No response
Relevant log output
No response
Similar or duplicate from https://github.com/dotnet/maui/issues/9971
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Similar or duplicate from #9971
No way to be marked as duplicate! This issue is about rendering image, not how it is positioning on the "container". This issue is about the clarity of image when the image is not as the same size as the container size, which will make the image to look pixelate, non-clear! So, clearly, not a duplicate 😊
Verified this issue with Visual Studio 17.7.0 Preview 1.0. Can repro on Windows platform with sample project. TestMAUI.