Closed Bug 13627 Opened 26 years ago Closed 25 years ago

PNG transparency problems when transparent color == background color

Categories

(Core :: Graphics: ImageLib, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 19283

People

(Reporter: spacecat42, Assigned: newt)

References

()

Details

Attachments

(6 files)

A PNG image with a palette color (gray) set to be transparent, when displayed over a background the same color as is set transparent (gray), yeilds white instead of the background color.
Assignee: pnunn → newt
Status: NEW → ASSIGNED
Could you please provide a test case? What version/date of Mozilla are you using?
This bug shows up with the nightly build D.L. on Sunday Sept 12.
See http://pobox.com/~newt/test/moz/mozpng-13627-viewer.png for a screenshot (sorry, attachments don't work for me). Looks good to me...no white in sight. I'm using the system libpng 1.0.2 and zlib 1.1.3, btw (i.e., not the ones in Mozilla). That's the only thing I can think that would explain the difference, and I'm not sure how to debug it if I can't see it. Oh yeah: mine was built from a CVS pull on 19990911 10:00 PDT and was run as root. apprunner doesn't work at all, and viewer cores immediately when run as non-root. Greg
Guys, under Win98 in 8 bit colour mode I see it like Greg, in 32 bit colour mode I see it as Chris, and in 16 bit colour mode I see the top image as per Greg and the bottom as per Chris.
Greg, you appear to be running under Unix, it might be a Windows only problem?
Yes, I'm running Linux, and on the basis of something dp told me last week, I assumed both of you were, too. (Sorry, I should have noticed the "Windows NT" box above...) This is good in the sense that we don't (necessarily) have still more Unix cross-platform weirdness going on, but bad in the sense that I can't test Windows builds myself. My best guess at the moment is that this may have something to do with the Windows-specific, DirectDraw alpha stuff Pamela was doing; certainly there's nothing in the PNG code that cares about your display depth. Just for yuks, can one of you try a GIF version of the same thing and see what happens? I would have to look at the code to be sure, but I think the GIF code does *not* expand the image data to RGB, which unfortunately means that the code paths for PNG and GIF are different. But I might be wrong, and if the same problem happens with GIF, then it's definitely an imagelib or gfx bug. Greg
I'd be happy to if you attach the test cases.
I have no problems with the image as a GIF file. The GIF background appears completely transparent, as opposed to the PNG version, which is only partially transparent/translucent. This machine is running under NT 4.00.1381, 24 bit color depth.
Yes, the GIF test cases work OK on all colour depths.
If DirectDraw is on by default, can someone turn it off for a nightly build? I don't have compilation facilities on my Win box.
Are there any other image formats in the Moz code that use alpha?
No, there are no other alpha formats in Mozilla--that's precisely why bug 3013 exists: all existing transparency support assumed a palette image with precisely one fully transparent color and everything else fully opaque. Moz does have support for full-image (or full-element) alpha transparency, but there is still no consistent support for per-pixel, 8-bit alpha. As for DirectDraw, I can't help with that, and it's 50% speculation at this point anyway. I need to do some digging to try to figure out what happens to the image data after it leaves the PNG code. Greg
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
They are the same bug, but 19283 is applied in more circumstances *** This bug has been marked as a duplicate of 19283 ***
[pinged Greg to request his okay prior to marking this bug as verified.]
Status: RESOLVED → VERIFIED
Haven't heard back from Greg --- rubber-stamping as Verified. --- Greg, please re-open if this resolution is erroneous.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: