Taking Screenshot with OpenGL sketch

Previously I tried to take screenshots of opengl sketches with scrot, but that doesn’t work see Processing window not showing in screenshot, however the raspi2png app which is easy to install does work.
Scrot


raspi2png

Try the save() function.

size(200, 200, P2D);
rect(50, 50, 50, 50);
save("screenshot.png");

Works perfectly on Windows 10 Spring Creators and Raspbian Stretch.

3 Likes

Ahem here is the Processing PI section, and therefore of interest to users of processing on the RaspberryPi operating system. Furthermore its in the title “Screenshot”, any fool can save a sketch.

Maybe you should re-read his answer! :wink:

1 Like

That still is not the point, if what you want is a screenshot (ie whole screen including the sketch) what he suggests simply does not do it!!! This is of interest to those people that have tried scrot to do the same thing, which works OK with non-opengl sketches, but fails to display opengl sketches.:angry:

Well you can try scrot with the save() function and combining them in an image editor. I know it is not as easy, however, it works. Pinta could be a sufficient image editor.

I quite understood your point - just found your response overly aggressive. And the reply is relevant to the Pi.

Incidentally, I noticed that raspi2png has an open bug related to the OpenGL driver. Although does scrot work in that case?

Yes but see it from my point of view, I post something that might be interesting to RaspberryPi users, it was not a request for help, and look what mess this has become, compounded by your unwelcome intervention!!!

You’re the one who responded uncivilly rather than simply explaining the difference in what you were trying to accomplish and what had been posted. It’s a public forum - it’s all about friendly dialogue! :smile:

There was incidentally a technical query in my post too - does either work with the OpenGL driver? (I’m not in a position to test at the moment).

i’m sure everyone on this forum that has interest or will have interest in this topic can appreciate multiple solutions. No need for the aggressive comments please:-)

1 Like

OK lets be clear about this, did you follow the links in my posting? Because if you had it should be perfectly clear that raspi2png works see screenshot of processing sketch Processing window not showing in screenshot. Further see TfGuy44 response to ben_suddenly. Now can you see my point. Both saveFrame and save work as expected, but that is not a screenshot, that ben_suddenly requested…
It is interesting to be able create screenshots to demonstrate that sketches run on raspberryPI, I was particularly pleased to find that raspi2png works as I had previously tried scrot got the same results as ben_suddenly, and therefore resorted to using saveFrame, but it doesn’t tell the story that the screenshot does.

You’ve got it wrong there, no solutions were required, my post was designed to pass on some useful information and I get this unwelcome response from a windows user (on a section for processingPI users) who does not appear to have read either the title or content of my post. If either he or Neil C Smith had followed the link it should have been clear to them no solution was required.

And if you’d read all of his post you’d have seen “Raspbian Stretch”! And yes, I had already read your links and knew why it was different - it was a tongue in cheek reply to get you to re-read and explain the difference rather than go all out attack.