-
Notifications
You must be signed in to change notification settings - Fork 1
ICO211
For historical reasons, the ICO file format contains two headers around each bitmap frame. Both headers specify the dimensions of the bitmap. The ICO file format requires both headers to agree on the height and width.
You will receive ICO210 if these two values do not agree on the bitmap's width. If these two values do not agree, then graphics libraries might select the wrong frame to display. For example, a graphics library might need to paint an icon in a 16x16 space, so it would select a frame that claims to be 16x16 pixels. But if the frame is not actually 16x16 pixels, then the graphics library might overdraw the icon, clip a larger image, or just fail outright.
Specifically:
- BITMAPINFOHEADER::biHeight must be equal to twice ICONDIRECTORY::bHeight
- BITMAPINFOHEADER::biWidth must be equal to ICONDIRECTORY::bWidth
Note that the value of the height stored in biHeight is doubled, also for historical reasons. Note that, since the dimensions given in the ICONDIRECTORY are only 8-bit integers, a value of 0 is interpreted to mean 256 pixels.
You might receive this warning if another tool is sloppy about how it embeds bitmaps inside the ICO file. If you happen to know exactly which tool generated this icon, please file an issue here on GitHub with that info, so we can improve the documentation and tooling.