Skip to content

Sometimes fails to get image #769

Open
@perdigao1

Description

@perdigao1

Depending on how the image was copied to clipboard, the result of this method can result in a blank (but with a finite width and height) image. This is obvious when in WPF and Image control is set image.Source = Clipboard.GetImage()
A solution for this problem exists, but code needs to use Windows.Forms API and the gdi32.dll. Applications such as Free Clipboard Viewer 3.0 display the bitmap correctly.
https://stackoverflow.com/questions/25749843/wpf-image-source-clipboard-getimage-is-not-displayed/25751020#25751020


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .net/svcPri2Indicates issues/PRs that are medium priorityarea-WPFIssues or PRs that relate to WPF or XAML.untriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions