Why did Windows 95 store image list bitmaps four-across instead of as a strict vertical strip?

Raymond Chen

We learned some time ago that bitmap strips should be stored vertically in order to improve data locality.

If you dig back into your dusty archives, you might discover that Windows 95 sort-of-but-not-quite followed this advice. It kept image lists in a mostly-vertical format, rather than a strictly-vertical format. In particular, It stored four images across.

In other words, instead of

A
B
C
D
E
F
G
H
I
J
K
L

Windows 95 stored images like this:

A B C D
E F G H
I J K L

Why didn’t Windows 95 use fully vertical bitmaps?

Because Windows 95 still had a 16-bit coordinate space.

The system image list could contain hundreds of icons, and the user could set their screen DPI as high as 120 (whoa!), which meant that large icons were 48 pixels tall. If the icons were kept in a single vertical strip, you could have up to ⌊32767÷48⌋ = 682 icons before overflowing a 16-bit signed integer.

This was an uncomfortably low number, so the shell team decided to trade off a little bit of locality for increased range and arranged icons four across instead of single-file. This bumped the limit to over 2000, which was a significant amount of breathing room.

0 comments

Discussion is closed.

Feedback usabilla icon