Open Bug 202795 Opened 21 years ago Updated 2 years ago

Transparency not preserved when printing

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

REOPENED

People

(Reporter: hsivonen, Unassigned)

References

()

Details

Attachments

(2 files)

Build ID: Camino 2003041205

Reproducible: Always

Steps to reproduce:
1) Print http://www.hut.fi/~hsivonen/test/alpha-print.html

Actual results:
The transparent PNG image is composited on white and then passed to the OS
printing service as a non-transparent bitmap. As a result, the CSS border that
is behind the image is completely covered by the image instead of showing through.

Expected results:
Since the print service of OS X can handle transparency, expected the bitmap to
be handed with the alpha channel to the print service so that the outcome would
more closely resemble the on-screen rendering.

*** This bug has been marked as a duplicate of 141656 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Reopening. Bug 141656 is about partial workarounds for printing services that
can't do full alpha. This is about passing the full alpha to a printing service
that can take it.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Henri Sivonen wrote:
> Reopening. Bug 141656 is about partial workarounds for printing services that
> can't do full alpha. This is about passing the full alpha to a printing 
> service that can take it.

Does MacOSX support an alpha channel for printers ?!
> Does MacOSX support an alpha channel for printers ?!

Yes (since Mac OS X 10.2.something). The app can use the PDF 1.4 imaging model
including transparency.
Things to do in
http://lxr.mozilla.org/seamonkey/source/gfx/src/mac/nsImageMac.cpp#338

1) Interleave the color data and the mask into an RGBA buffer.
2) Make a CGImageRef out of the buffer.
3) Get a Quartz graphics context for the grafport using QDBeginCGContext.
4) Figure out the coordinate system transformations.
5) Draw the image using CGContextDrawImage.
6) Re-enable QuickDraw using QDEndCGContext.
*** Bug 137114 has been marked as a duplicate of this bug. ***
Note that printing of transparent PNGs is vital for printing directions on Google Maps.
This is also an issue in current trunk and branch builds on windows.
OS: Mac OS X → All
Hardware: Macintosh → All
This bug is in Firefox 3 RC1.
The link in the original report is dead. For an example of a web page with a transparent image, see here:
http://www.w3.org/Graphics/PNG/inline-alpha.html
(Hopefully, this link lives longer)
It is surprising that this bug is receiving so little attention. By the way, Opera prints web pages with transparent images correctly.
Assignee: printing → nobody
QA Contact: sujay → printing
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: