On Sun, Sep 7, 2008 at 9:06 AM, Michael Drake <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
>   Sean Fox <[EMAIL PROTECTED]> wrote:
>> I also recall having added support for BMP's pseudo-transparency, but it
>> has to be requested by the client application or it will be ignored.
>
> Does NetSurf request it? I've noticed http://www.google.co.uk/favicon.ico
> has a black bit at the bottom in NetSurf. MS Paint shows it the same as
> NetSurf but Firefox shows it better. Is that the same thing?

Well, the only 'real' transparency in BMP images is in a 32bit
bitfield-encoded BMPs, which actually contain an alpha mask; otherwise
it's up to the application to determine whether transparency exists in
the image and handle it accordingly--or ignore it.  One common method
to create an illusion of transparency is to take the top-left pixel
colour and replace all occurences of that colour with transparency,
but as you can imagine this isn't always a good idea.  So, I created a
separate function that allows the client application to do this, but
we're not utilizing it at the moment.

There is also 32-bit RGB transparency, but this is yet another
pseudo-transparency.  The specification reserves the last 8 bits of
each pixel and states that they should always be zero, but some
applications utilize this byte as the alpha mask.  I'd have to look at
the code to see how we handled this special case; I believe we may
have left these bits alone and simply passed them on, but I could be
wrong.

Once again, I'm still out of town, but I'd be happy to take a look at
this particular image to see what kind of transparency exists, if any,
and try to determine why Firefox handles it differently.  At least,
I'm happy to hear that it displays similarly in MS Paint, so I know
it's not a bug. :)


Sean

Reply via email to