microsoft / microsoft/microsoft-ui-xaml
The image is not rendered properly when converting from Base64 to BitmapImage with Stretch set to None
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
I have an image inside a Border, where the Image.Source is updated using a BitmapImage created from a Base64 string. However, when Stretch is set to None, the image does not render properly.
I'm not sure whether this is an issue or expected native behavior — please take a look
**With Stretch None**

**With Strech Uniform**

### Steps to reproduce the bug
Please deploy the sample
[WinUIAppTesting.zip](https://github.com/user-attachments/files/20978853/WinUIAppTesting.zip)
### Expected behavior
_No response_
### Screenshots
_No response_
### NuGet package version
None
### Windows version
Windows 10 (1809): Build 17763
### Additional context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by deploying the attached WinUIAppTesting.zip sample on the reported Windows 10 build and compare the image with Stretch set to None versus Uniform. Trace the BitmapImage created from the Base64 string and determine whether the behavior is a rendering bug or expected native behavior; completion requires a confirmed cause and an agreed expected result.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100