I captured a screenshot of Minecraft Pi while I was playing it by pressing the "Prt Sc" button on my keyboard, but when I opened the image it shows the window with nothing in it:
This happens with using GIMP's builtin screenshot function too.
There's no other window running in front of minecraft pi.
1 Answer
Minecraft-Pi does not create screen images the same way as "normal" apps do - it is optimized to work directly with the GPU outside of the normal Linux kernel routines. So the GUI has no knowledge of what Minecraft-Pi is projecting in the window (it only renders the window outline) and your screenshot mechanism reflects this.
You can also see the results of this "special" treatment when you open up another program when Minecraft Pi is running - the content of Minecraft-Pi shows up on top of the other program, without the borders of the window.
To make a screenshot of Minecraft-Pi, use the raspi2png
program on GitHub. I have used this successfully in the past.
-
okay, so I cloned the raspi2png repository to ~/github/raspi2png and I typed
make
in the directory. It built the raspi2png but when I tried to use raspi2png it says that the command isn't found– algmwc4Commented Sep 9, 2016 at 11:13 -
It's been a while since I used it, but I think it builds
raspi2png
in the cloned directory, which means it is not in a global path location. So to run it you would need to specify the path to the file - easiest way to do this is to run it like so./raspi2png
. Alternatively you can (as root) move theraspi2png
program over to a global location such as/usr/local/bin
, after which you can run it the way you tried to.– Phil B.Commented Sep 9, 2016 at 14:29