title: using opencv instead of imagemagick in zbar qr code decoder
body: <p>I am writing a qr code decoder using Zbar api. I am using windows pre built libraries . I used the following code to load the image to ZBar</p>
  
  <pre><code>IplImage *src=cvLoadImage("image.png",CV_LOAD_IMAGE_GRAYSCALE);
  ImageScanner scanner;
  scanner.set_config(ZBAR_NONE, ZBAR_CFG_ENABLE, 1);  
  int width = src-&gt;width;
  int height = src-&gt;height;   
  uchar* raw = (uchar *)(src-&gt;imageData);
  Image image(width, height, "Y800", raw, width * height);
  int n = scanner.scan(image);
  </code></pre>
  
  <p>But it failed to decode the image. Am I using the correct way to read image data using opencv ? . When I tested only one image decoded and failed for all others . But it is working well when I used the zbarimg command line option </p>