The fix will be introduced in Vista by RTM

Nov 3, 2006 15:06 GMT  ·  By

A desktop background in Vista can be set either via the control panel or through the right-click menu option "Set as Desktop Background." The control panel enables the users to choose three position types for the background image, be it a BMP or a JPG: Fit to Screen, Center and Tile. Using the "Set as Desktop Background" option from Windows or Internet Explorer automatically rescales the image, preserving the aspect ratio. In this context, a discrepancy in the desktop background appearance and quality emerged between the control panel and Windows Photo Gallery.

The cause of this discrepancy, as you can also witness on the adjacent picture, is caused by the differences in functionality between the control panel and Photo Gallery/Explorer.

"The control panel applet works by directly setting a JPEG or BMP image. The Photo Gallery/Explorer approach works by making a new JPEG image that is pre-scaled to be the size of your monitor. And IE makes a new BMP the size of the source image. Support for JPEG wallpapers is a new feature in Vista. In previous versions of Windows, only BMP images could be used for wallpapers. Using JPEGs for wallpapers is a great improvement. A full-screen BMP image is several megabytes, and can even affect other performance enhancements like SuperFetch. JPEGs, being compressed, are much smaller," explained David Vronay, Microsoft Research Manager.

Due to the low level code and the simple linear interpolation scaling algorithm of JPG images, the change in resolution automatically resulted in scaling artifacts. Windows XP did not present this problem because Xp only dealt with BPM formats for desktop backgrounds. "Users would only notice this problem when using the new control panel for setting the background. If they used the explorer or Windows Photo Gallery, a new pre-scaled JPEG would be created using a high-quality scaling algorithm, and that image would be rendered unscaled by the desktop code. And if the user set the desktop from IE, IE would create a Bitmap, which would scale properly just like in XP," added Vronay.

The Windows Vista development team considered a number of alternative work-arounds before resolving the issue. The solution involves using a high-quality scaling algorithm available in the low-level code to work with decoded JPG images from 32-bit to 24-bit.

"A battery of testers made sure that the fix still worked with wallpapers of all sizes and formats, at different DPIs, with and without DWM, on 32-bit and 64 bit versions of Windows, at different screen depths, with malformed JPEGs, and with & without Terminal Services running. Senior architects reviewed the code to comment on its risk, correctness, security impact, application compatibility, etc," continued Vronay saying that the change was approved on Wednesday 2, November 2006.