title: How do browsers detect GIF image sizes?
body: <p>I was noticing that a GIF was being displayed with padding in FireFox 5 and IE 8. When I viewed the image size via FireBug, I noticed that it was a few pixels larger than expected.</p>
  
  <blockquote>
    <p>Expected height: 160px vs. actual height: 171px</p>
  </blockquote>
  
  <p>When I opened the GIF in an image editor, the editor displayed the correct dimensions, however when I ran ImageMagick identify I received the following information:</p>
  
  <pre><code>newGif.gif GIF 200x160 200x171+0+5 PseudoClass 256c 30kb 
  </code></pre>
  
  <p>If I modified the geometry to 200x160+0+0 the image displayed as I expected it to in FireFox. FireFox and IE 8 seemed to be referencing the Image's page geometry rather than dimensions! Is my analysis correct and if so is this true for all image types or just GIF's?</p>
  
  <blockquote>
    <p>Updated, I have included an image for your viewing pleasure! This image displays as 200 x 171 for me in FF, but is actually 200 x 160 when you download and view in a graphics program.</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/KYRbk.gif" alt="here is the image "></p>