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 5221f1e commit 1de12cfCopy full SHA for 1de12cf
1 file changed
PasteIntoFile/ClipboardContents.cs
@@ -838,8 +838,12 @@ public static ClipboardContents FromClipboard() {
838
var formats = extensions.SelectMany(ext => MimeForImageExtension(ext).Concat(new[] { ext }));
839
foreach (var format in formats) { // case insensitive
840
if (Clipboard.ContainsData(format) && Clipboard.GetData(format) is MemoryStream stream)
841
- if (Image.FromStream(stream) is Image img)
842
- images.Add(format, img);
+ try {
+ if (Image.FromStream(stream) is Image img)
843
+ images.Add(format, img);
844
+ } catch (Exception e) {
845
+ Console.WriteLine(e);
846
+ }
847
}
848
849
// Generic image from encoded data uri
0 commit comments