问题
I've written a Shell Icon Overlay handler that contains a multi-image icon with 256, 48, 32 and 16 bit icons. The overlay bits are in the lower left corner, and respectively are 32, 15, 10 and 6 bits.
In Windows Explorer, with the View set to Small, the icons are 16 bits and the overlay selected consumes 6 bits. Medium icons: 48 bits overlaid with 10. All as I expected.
When the View is set to Large, a 96 bit icon is used, which is overlaid with 15 bits. Whether this is the 15 bits from the 48 bit overlay, or downsampled from the 256 bit, I can't tell. If I add a 96 bit overlay to the multi-image, using 32 bits for the overlay (just as a test), the overlay used still appears as 15 bits.
When the View is set to Extra Large, the overlay used is still just 15 bits. Just a splotch on a very big icon.
All of the above is on Windows 7. On Windows 8 desktop, the same results are seen, EXCEPT that the Extra Large icon is now only overlaid with a 12*12 bitmap, clearly downsampled from a larger size (15? 32?)
Can anyone help with a definitive answer for what size overlays I should be providing for maximizing the viewing experience?
回答1:
If you see on overlay icon of lnk file in imageres.dll you will see that icon contains the following formats:
- 48x48x16
- 32x32x16
- 16x16x16
- 48x48x8
- 32x32x8
- 16x16x8
- 256x256x32
- 48x48x32
- 32x32x32
- 16x16x32
I think if Microsoft uses such formats for internal overlay icons it is optimal variant to use the same formats too.
来源:https://stackoverflow.com/questions/22973841/how-does-the-windows-shell-resize-icon-overlays