Topic was automatically imported from the old Question2Answer platform.
Asked By
Leandro
Greetings,
Apparently the Printscreen doesn’t send screencaptures to Windows clipboard (BTW, why?)… So, how can I take screenshots of my whole screen and save it as a file?
Thanks in advance.
… and what does this have to do with Godot exactly? Have you tried Google searching first?
if Input.is_key_pressed(KEY_PRINT):
# start screen capture
var image = get_viewport().get_texture().get_data()
image.flip_y()
image.save_png("c:/lixo/screenshot.png")
Believe it or not, now it stopped saving screenshots. When I press PrintScreen, the program stutters a little like before, which seems it’s saving the screenshot, but when I look inside it, there’s no screenshot.
And before someone asks, yes, I have the permission for the folder and there’s no file in there that cannot be overwritten.
Leandro | 2018-12-18 20:12
Strange because it worked for me.
SIsilicon | 2018-12-18 23:33
Even stranger: it worked for me. After sometime it stopped working. I’ll check it out.
Thanks anyway!
P.S.: Found the problem. Apparently it did not work with Print Screen, but when I used another key it worked fine. Thanks again!
Leandro | 2018-12-19 00:29
Okay. Posted it as answer. Why don’tcha select my answer instead?