-
Notifications
You must be signed in to change notification settings - Fork 1
ICO221
When storing a bitmap in an ICO file, the ICO file also requires a mask. The mask specifies which pixels are transparent: both for painting, and also possibly for hit-testing. For example, if the user clicks on a masked-out pixel of an icon, the GUI framework might choose to ignore the click.
Since the mask and the bitmap are stored separately, the bitmap does still need to have some color value inside a pixel that is masked out. The ICO file format requires that each masked-out pixel contains the color value for black: <R,G,B> = <0,0,0>. You will receive warning ICO221 if there's at least one pixel that is masked out, yet does not contain the color black.
I'm not aware of any bad side effects of ignoring this rule, but that does not mean you should blithely generate ICOs that are technically illegal.
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.