title: opening a jpg file in python
body: <pre><code>from PIL import Image
  import cv2 #EDIT, this line added
  
  im = Image.open('withmed.jpg',0)
  im.show('image',img)
  k = cv2.waitkey(0)
  if k == 27:
      cv2.destroyAll windows
  </code></pre>
  <p>I am trying to  open a jpg image which is saved in desktop. but on running this piece of code an error is popping out</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/home/anusha/aswathy.py&quot;, line 5, in &lt;module&gt;
      cv2.imshow('image',img)
      error: /build/buildd/opencv-2.4.8+dfsg1/modules/highgui/src/window.cpp:269: 
      error: (-215) size.width&gt;0 &amp;&amp; size.height&gt;0 in function imshow
  </code></pre>