

Indicated DPI from
document.getElementById("inches").offsetWidth
should match what your system is set to and/or reporting.
| System Setting | Gecko Reports | Opera Reports |
|---|---|---|
| 72 | 72 | 72 |
| 84 | 85 | 84 |
| 96 | 96 | 96 |
| 100 | 103 | 100 |
| 108 | 111 | 108 |
| 120 | 120 | 120 |
| 132 | 131 | 132 |
| 144 | 144 | |
| 168 | 160 | |
| 192 | 180 |
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