Skip to content

Investigate removing hard dependency on System.Drawing.Common for Clipboard #10740

Open
@JeremyKuhne

Description

@JeremyKuhne

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-clipboardIssues related to DataObject and shared clipboard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions