#!/usr/bin/python

import picamera
import time

with picamera.PiCamera() as camera:
   camera.resolution = (640, 480)
   camera.start_preview()
   time.sleep(10)
   camera.capture('/home/pi/Pictures/image8.jpg')
   camera.stop_preview()