image measuring one inch wide
image measuring 25.4 mm wide
DPI

Indicated DPI from
document.getElementById("inches").offsetWidth
should match what your system is set to and/or reporting.

System
Setting
Gecko
Reports
Opera
Reports
727272
848584
969696
100103100
108111108
120120120
132131132
144144
168160
192180

Note: Gecko does all internal lengths in twips and converts to pixels as needed. There are 1440 twips in an inch. At 100 DPI, that means 14.4 twips per pixel, but that number is rounded to an integer. So you get 14 twips per pixel as the nominal resolution Gecko actually uses. Now when converting 1440 twips to number of pixels we get: 1440 / 14 = 100 + 40 / 14 = 100 + 3 - 2 / 14, which gets rounded to 103px.

Note: Since mozilla bug 288064 was fixed, an incorrect DPI may be reported until the page is reloaded. This is because the script will run before the image loads, thereby measuring the width of the alt text instead of the image.

Note: If the images do not measure as indicated, your DPI is not accurately set.

Last modified 2005/11/17