Hi,
the attached Windows icon is 1-bit (has 2 colors) and a palette, as well as palette-index-based boolean transparency for the background. Firefox and Gimp display the icon correctly, but Safari on Mac and XnView MP on Mac display it incorrectly. While Safari is missing to color for the icon but has transparency, XnView gets the logo color correctly but lacks the transparent background.
0.51: No transparency with 1-bit Windows icons
Moderators: helmut, XnTriq, xnview, Dreamer
0.51: No transparency with 1-bit Windows icons
- Attachments
-
- git.ico.zip
- Windows 1-bit icon file with transparency
- (1.24 KiB) Downloaded 171 times
Last edited by eyebex on Mon Jul 09, 2012 8:07 am, edited 1 time in total.
Re: 0.51: No transparency with 1-bit Windows icons
The same issue with transparency seems to exist for 1-bit GIF images, too.
- Attachments
-
- git.gif.zip
- GIF image with 1-bit colors and transparency
- (1.56 KiB) Downloaded 164 times
Re: 0.51: No transparency with 1-bit Windows icons
BTW, as a note to myself, I just learned that transparency in <= 8-bit icon files is not defined by declaring a specific color palette entry to be handled as transparent, but by an additional mask that comes with the icon. So using transparency in an icon does not reduce the number of available colors.eyebex wrote:the attached Windows icon is 1-bit (has 2 colors) and a palette, as well as palette-index-based boolean transparency
Re: 0.51: No transparency with 1-bit Windows icons
Thanks for bringing this (AND + XOR bitmask) to my attention, eyebexeyebex wrote:BTW, as a note to myself, I just learned that transparency in <= 8-bit icon files is not defined by declaring a specific color palette entry to be handled as transparent, but by an additional mask that comes with the icon. So using transparency in an icon does not reduce the number of available colors.

- GConvert Online Help: What Is An Icon? » Icon transparency
- QB64 Wiki: Icons and Cursors
File Formats Wiki ([url=http://fileformats.wikia.com/wiki/Icon]Icon[/url] » Icon sizes, color depths, and transparency data) wrote:Icon image data was always made up of two bitmaps: the AND bitmap and the XOR bitmap. The AND bitmap is 1 bit per pixel and is applied first to decide which areas of the image are affected by the background. The XOR bitmap is then applied using XOR. This allows for transparent areas in the image but also allows for inverting the background and other tricks.