Effects not rendered correctly in System.Windows.Media.Imaging.RenderTargetBitmap on ARM64
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
The System.Windows.Media.Imaging.RenderTargetBitmap can be used to render UI controls, but when controls have effects such as BlurEffect or DropShadowEffect, the effects are lost and cannot be rendered correctly in ARM64 environment. However, this issue does not occur on x86 and x64 platforms.
### Reproduction Steps
Minimal reproduction: https://github.com/WXRIW/RenderTargetBitmapTest
Key code:
```
public static System.Windows.Media.Imaging.RenderTargetBitmap SaveFrameworkElementToImage(FrameworkElement ui, double renderScale = 1)
{
System.Windows.Media.Imaging.RenderTargetBitmap bmp = new(
(int)(ui.ActualWidth * renderScale),
(int)(ui.ActualHeight * renderScale),
96d * renderScale,
96d * renderScale,
System.Windows.Media.PixelFormats.Default);
bmp.Render(ui);
return bmp;
}
```
### Expected behavior

### Actual behavior

### Regression?
Both .NET 6 and .NET 8 have this issue.
### Known Workarounds
_No response_
### Impact
_No response_
### Configuration
ARM64
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.