rpicam-jpeg
rpicam-jpeg helps you capture images on Raspberry Pi devices.
To capture a full resolution JPEG image and save it to a file named test.jpg, run the following command:
$ rpicam-jpeg --output test.jpg
You should see a preview window for five seconds. Then, rpicam-jpeg captures a full resolution JPEG image and saves it.
Use the timeout option to alter display time of the preview window. The width and height options change the resolution of the saved image. For example, the following command displays the preview window for 2 seconds, then captures and saves an image with a resolution of 640×480 pixels:
$ rpicam-jpeg --output test.jpg --timeout 2000 --width 640 --height 480