0.51: No transparency with 1-bit Windows icons

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
eyebex
Posts: 32
Joined: Thu Jul 29, 2004 8:11 pm

0.51: No transparency with 1-bit Windows icons

Post by eyebex »

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.
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.
eyebex
Posts: 32
Joined: Thu Jul 29, 2004 8:11 pm

Re: 0.51: No transparency with 1-bit Windows icons

Post by eyebex »

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
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: 0.51: No transparency with 1-bit Windows icons

Post by XnTriq »

eyebex
Posts: 32
Joined: Thu Jul 29, 2004 8:11 pm

Re: 0.51: No transparency with 1-bit Windows icons

Post by eyebex »

eyebex wrote:the attached Windows icon is 1-bit (has 2 colors) and a palette, as well as palette-index-based boolean transparency
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.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: 0.51: No transparency with 1-bit Windows icons

Post by XnTriq »

eyebex 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.
Thanks for bringing this (AND + XOR bitmask) to my attention, eyebex :-)
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.
Post Reply