title: Is it possible to tell the quality level of a JPEG?
body: <p>This is really a two part question, since I don't fully understand how these things work just yet:</p>
  
  <p>My situation: I'm writing a web app which lets the user upload an image. My app then resizes to something displayable (eg: 640x480-ish) and saves the file for use later.</p>
  
  <p>My questions:</p>
  
  <ol>
  <li>Given an arbitrary JPEG file, is it possible to tell what the quality level is, so that I can use that same quality when saving the resized image?</li>
  <li>Does this even matter?? Should I be saving all the images at a decent level (eg: 75-80), regardless of the original quality?</li>
  </ol>
  
  <p>I'm not so sure about this because, as I figure it: (let's take an extreme example), if someone had a 5 megapixel image saved at quality 0, it would be blocky as anything. Reducing the image size to 640x480, the blockiness would be smoothed out and <strike>barely</strike> less noticeable... until I saved it with quality 0 again...</p>
  
  <p>On the other end of the spectrum, if there was an image which was 800x600 with q=0, resizing to 640x480 isn't going to change the fact that it looks like utter crap, so saving with q=80 would be redundant.</p>
  
  <p>Am I even close?</p>
  
  <p><em>I'm using GD2 library on PHP if that is of any use</em></p>