title: How to resize an image with OpenCV2.0 and Python2.6
body: <p>I want to use OpenCV2.0 and Python2.6 to show resized images. I used and adopted <a href="http://opencv.willowgarage.com/documentation/python/cookbook.html" rel="noreferrer">this</a> example but unfortunately, this code is for OpenCV2.1 and does not seem to be working on 2.0. Here my code:</p>
  <pre><code>import os, glob
  import cv
  
  ulpath = &quot;exampleshq/&quot;
  
  for infile in glob.glob( os.path.join(ulpath, &quot;*.jpg&quot;) ):
      im = cv.LoadImage(infile)
      thumbnail = cv.CreateMat(im.rows/10, im.cols/10, cv.CV_8UC3)
      cv.Resize(im, thumbnail)
      cv.NamedWindow(infile)
      cv.ShowImage(infile, thumbnail)
      cv.WaitKey(0)
      cv.DestroyWindow(name)
  </code></pre>
  <p>Since I cannot use</p>
  <pre><code>cv.LoadImageM
  </code></pre>
  <p>I used</p>
  <pre><code>cv.LoadImage
  </code></pre>
  <p>instead, which was no problem in other applications. Nevertheless, cv.iplimage has no attribute rows, cols or size. Can anyone give me a hint, how to solve this problem?</p>