Open
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.