Processing window not showing in screenshot

after i finally got everything running reasonably well i’ve noticed that when i take a screenshot of the full desktop the processing sketch window is black

button.py is running scrot (in terminal) on button press, which ive never had a issue with before so it seems to be the sketch window, is there any way i can fix this, and other screen capture that will work?

//raspberry pi 3, processing and terminal are being used here

cheers and any help would be greatly appreciated

Weird. I know of several programs that do this. My computer’s Netflix app does it, for example. I don’t know what the exact cause is, but it’s probably something your-computer-related, not something Processing is doing.

You can always use saveFrame() to grab an image of your sketch. That works at least, right?

My guess is the sketch is opengl (P2D or P3D) and so transparent to scrot when using the default renderer.
https://www.raspberrypi.org/forums/viewtopic.php?t=142623 might be useful?

I tried the raspi2png app in link above and it does work see screenshot of picrate sketch below:-

cheers for the help that works great, now i need to stop it overwriting the images. as far as i know this should work

import time
import datetime
import subprocess

def take_photo():
print (“taking photo”)
print (“1”)
imagepath=datetime.datetime.now().strftime("%m_%d_%Y_%H_%M_%S")
print (“2”)
subprocess.call ([“raspi2png -p, (imagepath)”])
print (“3”)
print(“PHOTO_saved_to_path”)

but it stops the script at print(“2”) any idea whats wrong with the subprocess call or is it more complex than i think?

cheers again

Thanks for sharing this information. It’s useful