title: How to obtain image size using standard Python class (without using external library)?
body: <p>I am using Python 2.5. And using the standard classes from Python, I want to determine the image size of a file.</p>
  
  <p>I've heard PIL (Python Image Library), but it requires installation to work.</p>
  
  <p>How might I obtain an image's size without using any external library, just using Python 2.5's own modules?</p>
  
  <p>Note I want to support common image formats, particularly JPG and PNG.</p>