title: getting the shape of an image file from python without loading the image
body: <p>Is there an efficient way to know the size (height, weight, channels) of an image file, without actually loading it into python?</p>
  
  <p>The trivial way would be:</p>
  
  <pre><code>img = cv2.imread('a.jpg')
  print img.shape
  </code></pre>
  
  <p>but that would waste the CPU (and memory) as I don't need the image itself.</p>