Chapter 8 The Raspberry Pi Camera Module 199
THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE
5 Figure 8-5: The live preview from the camera
If the live preview was upside-down, you’ll need to tell raspistill that the camera is rotated.
The Camera Module is designed to have the ribbon cable coming out of the bottom edge; if it’s
coming out of the sides or the top, as with some third-party camera mount accessories, you
can rotate the image by 90, 180, or 270 degrees using the -rot switch. For a camera mounted
with the cable coming out of the top, simply use the following command:
raspistill -rot 180 -o test.jpg
If the ribbon cable is coming out of the right-hand edge, use a rotation value of 90 degrees;
if it’s coming out of the left-hand edge, use 270 degrees. If your original capture was at the
wrong angle, try another using the -rot switch to correct it.
To see your picture, open the File Manager from the Accessories category of the raspberry
menu: the image you’ve taken, called test.jpg, will be in your home/pi folder. Find it in the list
of files, then double-click it to load it in an image viewer (Figure 8-6). You can also attach the
image to emails, upload it to websites via the browser, or drag it to an external storage device.
5 Figure 8-6: Opening the captured image