Tuesday, August 23, 2005

The Old New Thing : Why are icons multiples of 8 pixels in width?

"Icons are all multiples of eight pixels in width. It's not just because computer people like powers of two.

Back in the early days of Windows, video cards were monochrome or, if you were lucky, 16-color. These were all planar video modes, the mechanics of which were discussed earlier. Now imagine copying a bitmap to the screen where both the bitmap and the screen are planar. If the starting coordinates of the destination was an exact multiple of eight, then the bitmap could be copied via block transfer instructions. On the other hand, if the destination was not a perfect multiple of eight, you had to do a lot of fancy bit shifting to get it onto the screen."


I love these history lessons!