« CSI: South Park | Main | ETSET Version 3.2 Posted »

Tuesday, May 16, 2006

Windows XP: "DPI Setting" Gotcha

On the rare occasions I've booted Windows XP on my Dell “laptop” development machine in order to test new Web pages with Microsoft Internet Explorer, I've noticed that even when the pages were rendered properly by the browser, embedded raster images looked, to be polite, like refried puke: apparently scaled up by some kind of crude algorithm with obvious artefacts on all edges. Since other, more competently implemented, browsers displayed these pages correctly, I filed this in the “that's odd—gotta look into that someday” category and got on with the job at hand.

Today, I decided to take the flying leap into the unknown and installed the Beta 2 pre-release of Internet Explorer 7 (version 7.0.5346.5 to be precise). After the to-be-expected illegal memory reference crash in the installer, power cycle after being unable to launch the task manager to kill the looping installer, re-install, and the obligatory reboot thereafter (I suppose I shouldn't complain—the morons at Adobe required three reboots to install their momentous Adobe Reader 7.0.7 update!), I discovered that the latest and greatest version of Explorer had the same crappy display of raster images, and decided to dig deeper into the matter.

Here, side by side, is the Fourmilab logo as displayed in the title frame of The Hacker's Diet by Mozilla Firefox (left) and Internet Explorer 7.0 (right):


Now, what's obvious from this, apart from how pathetic the Explorer image looks, is that it's bigger than the one displayed by Firefox. In fact, examination of the image on screen reveals that while Firefox has displayed the image pixel-for-pixel on the screen, Explorer has crudely embiggened it to 125% of its original size. What could account for that?

Microsoft Windows contains as much unwritten lore as that memorised by a 33° Mason or a fully paid-up initiate of selfosophy. But, unlike these cults, the hidden Windows wisdom changes with every “service pack”, so any investment you make in learning it is a wasting asset. In this case, the secret is buried in the Control Panel (assuming you have selected the “Classic” view, which actually permits you to see all the options, as opposed to navigating through categories chosen by marmosets shooting craps with icosahedral nerd dice), under “Display / Settings / Advanced / DPI Settings”, where you can choose either “Normal Size” or “Large Size” display. If you choose “Normal”, then images are displayed (by applications which pay attention to this setting) pixel-for-pixel on the screen. But if you should select “Large”, then they are crudely scaled up, looking like the site you're viewing was designed by some kid at a “k12” site closer to the letter than the double digit discharge conduit.

Now, if this were some arcane setting you could select only by navigating through an “Advanced” button it would be an obscure footnote but, Microsoft, in their wisdom, have chosen to automatically enable this mode on systems where they deem the display size too small for how many dots the screen may happen to have. This means that dozens of millions of people with laptops and high-resolution screens will only see graphics properly displayed if they change this obscure setting and/or abandon Explorer in favour of a better browser.

Posted at May 16, 2006 01:49