Investigate removing hard dependency on System.Drawing.Common for Clipboard
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
Now that CsWin32 is fully available, there is no need to load the entirety of `System.Drawing.Common` to handle Clipboard scenarios. https://github.com/dotnet/wpf/tree/main/src/Microsoft.DotNet.Wpf/src/Extensions/PresentationFramework-SystemDrawing should be able to be removed.
To do this safely, GDI+ initialization needs to be done via `GdiPlusInitialization.EnsureInitialized()` in `System.Private.Windows.Core`. GDI+ CsWin32 handle types are exposed in this assembly.
GDI+ is mostly being used for creating HBITMAP and looking at image metadata. Another option here may be going directly against WIC APIs for some of the functionality, which GDI+ uses under the covers anyway.
Contributor guide
Assessment
This issue has not been assessed yet.