dotnet / dotnet/dotnet-api-docs

Sometimes fails to get image

Offen
#769 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
.net/svc area-WPF Pri2 untriaged
Vorherrschende Sprache
C#
Sterne
949
Forks
1.7k
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
52

Beschreibung

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

* ID: 85bb3f94-8ee1-71c6-5f3d-1a79acf36e05
* Version Independent ID: bd9a08d0-e44e-b797-7c8d-2998364402bc
* Content: [Clipboard.GetImage Method (System.Windows)](https://docs.microsoft.com/en-us/dotnet/api/system.windows.clipboard.getimage?f1url=https%3A%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Clipboard.GetImage);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.6.1);k(DevLang-VB)%26rd%3Dtrue%26f%3D255%26MSPPError%3D-2147217396&view=netframework-4.7.2)
* Content Source: [xml/System.Windows/Clipboard.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Windows/Clipboard.xml)
* Service: **.net**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit xml/System.Windows.Clipboard.xml und der in der issue verlinkten Dokumentation zu Clipboard.GetImage. Reproduziere das gemeldete WPF-Verhalten anhand der verlinkten Stack Overflow-Lösung oder überprüfe es, und ermittle anschließend, wie die Einschränkung oder der Workaround dokumentiert werden sollte. Als erledigt gilt die Aufgabe, wenn die API-Dokumentation den Fall eines leeren Bildes und alle unterstützten Hinweise dazu korrekt erklärt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.