Download
Open a terminal and clone the repository from github:
cd ~ git clone https://github.com/AndrewFromMelbourne/raspi2png
Use
Change directory to raspi2png and run the program's help to show all the options:
cd ~/raspi2png ./raspi2png --help
Usage: raspi2png [--pngname name] [--width] [--height ] [--compression ] [--delay ] [--display ] [--stdout] [--help] --pngname,-p - name of png file to create (default is snapshot.png) --height,-h - image height (default is screen height) --width,-w - image width (default is screen width) --compression,-c - PNG compression level (0 - 9) --delay,-d - delay in seconds (default 0) --display,-D - Raspberry Pi display number (default 0) --stdout,-s - write file to stdout --help,-H - print this usage information
To take screenshot you have to use the -p option and pass an image filename:
./raspi2png -p myscreenshot.pngAnother really useful option is -d to delay when to take the picture, this enables you to get the screen ready for a shot - to take a picture delayed by 10 seconds:
./raspi2png -p mydelayedshot.png -d 10The image files will be created in the ~/raspi2png directory - if you want them in a different directory use a full path:
./raspi2png -p /home/pi/mydir/myscreenshot.pngIf you use a filename which already exists raspi2png will overwrite the file without warning and the old image will be lost.
Fyi - I wrote this blog post using a Raspberry Pi 3... First time I've used a Pi to write about a Pi - thats progress!
That is pretty cool. And the only reason I know what minecraft is, is because I had to get my young grandson some sort of minecraft sword for Christmas. BlockLauncher
ReplyDeleteLooking for a way to make an export of blocks 3d obj or stl ? do you have some ideas? thank you !
ReplyDeletehi martin, im a high school student and we are using a raspberry pi v01.1 we have to create a game in minecraft using a code but i didnt get enough knowledge from my teacher. I dont know how to start. can you help me?? please thanks
ReplyDeleteWhat do you want my help with?
DeleteThank for the code ! I used it with Raspbin Jessie but am hav trouble with it in Stretch .
ReplyDelete$ ~/raspi2png/raspi2png - start1.png
raspi2png: unable to open display 0
Your Minecraft-Pi stuff is epic!
I dont know what to suggest... I tried earlier on stretch and didnt have a problem. Are you using an add-on screen or anything?
DeletePerhaps try stating a different screen no using:
raspi2png --display 1