title: Scanning QR Code via zbar and Raspicam module
body: <p>I want to use my raspi cam modul to scan QR codes.
  For detecting and decoding qr codes I want to use zbar.
  My current code:</p>
  
  <pre><code>import io
  import time
  import picamera
  import zbar
  import Image
  
  if len(argv) &lt; 2: exit(1)
  
  # Create an in-memory stream
  my_stream = io.BytesIO()
  with picamera.PiCamera() as camera:
      camera.start_preview()
      # Camera warm-up time
      time.sleep(2)
      camera.capture(my_stream, 'jpeg')
  
  scanner = zbar.ImageScanner()
  scanner.parse_config('enable')   
  
  pil = Image.open(argv[1]).convert('L')
  width, height = pil.size
  raw = pil.tostring()
  
  my_stream = zbar.Image(width, height, 'Y800', raw) 
  
  scanner.scan(image)
  
  for symbol in image:
      print 'decoded', symbol.type, 'symbol', '"%s"' % symbol.data
  </code></pre>
  
  <p>As you may see, I want to create a picture stream, send this stream to zbar to check if a qr code is contained in the picture.
  I am not able to run this code, this error is the result:</p>
  
  <blockquote>
    <p>Segmentation fault</p>
    
    <p>------------------ (program exited with code: 139) Press return to continue</p>
  </blockquote>
  
  <p>I don't find any solution how to fixx this bug, any idea?</p>
  
  <p>Kind regards;</p>