Saves and loads png images.
- Mac OSX: brew install libpng
- Ubuntu: sudo apt-get install libpng-dev
Loading png files
i_pngfile toto.png | o_gtk_image loads the png toto.png and displays it.
You can load a lot of images by specifying the number of image to load with -n3. Then define the filename like with printf format.
Example loading toto0.png, toto1.png, toto2.png:
i_pngfile toto%d.png -n3 | o_gtk_image
It reads at the speed of the reader.
You may specify the time between each image with
Use -p33 to simulate a framerate of 30FPS.
Saving images in png
i_image.sh | o_pngfile toto.png save the image from your webcam in toto.png.
- Note 1: your webcam may be slow to start and having a black image at first. You can save 3 the third image with option -n3.
- Note 2: depending on your camera property, the format may not be recognized by the libpng you can convert it with for example in black and white with -fY800. It may not be recognise at all by i_image.sh.
Like for reading, you can save many images with -n and a specific file format.