You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For non-browser applications I pasted from Chrome (which works) and then copied again before pasting (which fails.) For ShareX I took a screen capture of the image.
Working:
Google Chrome (Copy Image)
Microsoft Edge (Copy Image)
ShareX (Copy image to clipboard, UseAlternativeClipboardCopyImage True)
Empty Image (Failure):
Firefox (Copy Image)
ShareX (Copy image to clipboard, UseAlternativeClipboardCopyImage False)
Crash (Failure):
MSPaint (Ctrl + C)
ClipStudioPaint 2.1.4 (Ctrl + C)
Krita 3.1.4 (Ctrl + C)
The clipboards that work have PNG data in them (according to Free Clipboard Viewer) and the others have either a lot of extraneous information (Firefox) or Bitmap/DIB/V5.
I went back to 4.2dev2 (which I think is the earliest dev release after #63826 was merged) to test this, but it still doesn't work in 4.2dev5.
Steps to reproduce
Copy this image from different applications and attempt to create an Image from it using clipboard_get_image.
Just a bit more info: ShareX clipboard behaviour can be changed in the advanced application settings which allows clipboard_get_image to work with ShareX.
Perhaps Clipboard.ContainsImage() and Clipboard.GetImage() could be used instead to access Bitmap image data on the clipboard? Looks like a little extra work would be needed to get the bmp data from the returned BitmapSource, but maybe it's more reliable than GetClipboardData(CF_DIB) in getting the various flavors of bitmap data that can be placed on the windows clipboard? At least it looks like it's intended to be.
I ran into a similar issue. Depending on the source program, clipboard_get_image() crashes in official builds, and in dev build it returns corrupted data:
I tested with GIMP (works) and IrfanView (corrupted).
Godot version
v4.2.dev2.official [da81ca6]
System information
Godot v4.2.dev2 - Windows 10.0.19044 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 970 (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 Threads)
Issue description
clipboard_get_image works in some contexts (PNG data) but fails with an empty image error or hard crash in others (Bitmap/DIB/V5 data.) I tested with this image: https://godotengine.org/assets/press/logo_large_color_light.png
For non-browser applications I pasted from Chrome (which works) and then copied again before pasting (which fails.) For ShareX I took a screen capture of the image.
Working:
Google Chrome (Copy Image)
Microsoft Edge (Copy Image)
ShareX (Copy image to clipboard, UseAlternativeClipboardCopyImage True)
Empty Image (Failure):
Firefox (Copy Image)
ShareX (Copy image to clipboard, UseAlternativeClipboardCopyImage False)
Crash (Failure):
MSPaint (Ctrl + C)
ClipStudioPaint 2.1.4 (Ctrl + C)
Krita 3.1.4 (Ctrl + C)
The clipboards that work have PNG data in them (according to Free Clipboard Viewer) and the others have either a lot of extraneous information (Firefox) or Bitmap/DIB/V5.
I went back to 4.2dev2 (which I think is the earliest dev release after #63826 was merged) to test this, but it still doesn't work in 4.2dev5.
Steps to reproduce
Copy this image from different applications and attempt to create an Image from it using
clipboard_get_image
.Minimal reproduction project
clipboard-image-mrp.zip
The text was updated successfully, but these errors were encountered: