tRNS and bKGD chunks not working




18 years ago
18 years ago


(Reporter: mlund, Assigned: pavlov)


Windows 98

Firefox Tracking Flags

(Not tracked)





18 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.3) Gecko/20010801
BuildID:    2001080110

With PNG, transparency control is possible without the storage cost of a full
alpha channel using the tRNS chunk.

The test URL shows images with and without tRNS and bKGD (background) chunks.

If the tRNS and bKGD chunks were working, the images would appear as follows:

With this build, the PNGs are rendered with a solid white background.

Reproducible: Always
Steps to Reproduce:
1. Display the PNG images at

Actual Results:  The images containing the tRNS chunks are always rendered with
a solid white background.

Expected Results:  The image named tp1n3p08 should have been rendered onto the
browser background as it contained no bKGD chunk. The other transparent images
should have been rendered onto the colour specified in the bKGD chunk.

According to the PNG specification, tRNS and bKGD chunks are ancillary and so
support is not required. However they are useful. In particular tRNS allows you
to specify transparency for paletted images.
This worksforme.  I see the correct backgrounds.  Reporter, are you still seeing
the problem?

Comment 2

18 years ago
I've just downloaded milestone 0.9.5 (win32 build 2001101117) and I can now see
the browser background through the images.

Looking at the PNG spec section 10.7 Background colour it says: (quote):
"Viewers that have a specific background against which to present the image
(such as Web browsers) should ignore the bKGD chunk, in effect overriding bKGD
with their preferred background color or background image."

So from what I can see it's now working correctly.

Comment 3

18 years ago
Agreed. Marking WFM.
Last Resolved: 18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.