We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cad43ad commit f28b388Copy full SHA for f28b388
PasteIntoFile/ClipboardContents.cs
@@ -798,8 +798,12 @@ public static ClipboardContents FromClipboard() {
798
var formats = extensions.SelectMany(ext => MimeForImageExtension(ext).Concat(new[] { ext }));
799
foreach (var format in formats) { // case insensitive
800
if (Clipboard.ContainsData(format) && Clipboard.GetData(format) is MemoryStream stream)
801
- if (Image.FromStream(stream) is Image img)
802
- images.Add(format, img);
+ try {
+ if (Image.FromStream(stream) is Image img)
803
+ images.Add(format, img);
804
+ } catch (Exception e) {
805
+ Console.WriteLine(e);
806
+ }
807
}
808
809
// Generic image from encoded data uri
0 commit comments