AndrewFromMelbourne / raspi2png

Utility to take a snapshot of the Raspberry Pi screen and save it as a PNG file
MIT License
213 stars 78 forks source link

How to run this? #1

Closed woosaj closed 11 years ago

woosaj commented 11 years ago

Can you please tell me how can I run this?

AndrewFromMelbourne commented 11 years ago

You will need to build it first, it is a C program. Once you have cloned the repository you will need to use the 'make' command to build the raspi2png executable. By default if you run raspi2png it will create a file called snapshot.png. There are a number of switches you can use on the command itself.

Usage: raspi2png [-p pngname] [-v] [-w ] [-h ] [-t ] [-d ] -p - name of png file to create -v - verbose -h - image height (default is screen height) -w - image width (default is screen width) -t - type of image captured can be one of the following: RGB565 RGB888 RGBA16 RGBA32 -d - delay in seconds (default 0)

Hope that helps.

woosaj commented 11 years ago

make command is not working for me

make: libpng-config: Command not found cc -Wall -g -O3 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -g -c raspi2png.c -o raspi2png.o -Wno-deprecated-declarations raspi2png.c:29:17: fatal error: png.h: No such file or directory compilation terminated. make: *\ [raspi2png.o] Error 1

AndrewFromMelbourne commented 11 years ago

Yes, sorry you need to install libpng.

sudo apt-get install libpng12-dev

should do the trick. Then try 'make' again.

woosaj commented 11 years ago

It's working thanks