Bug 688261 - Antialiasing with Transparency Mask
Summary: Antialiasing with Transparency Mask
Status: RESOLVED DUPLICATE of bug 687674
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.51
Hardware: PC Windows XP
: P3 blocker
Assignee: Stefan Kemper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-11 10:10 UTC by Adam Augusta
Modified: 2007-12-13 12:55 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
NoTransparency.PDF - Working case with no transparency (2.08 KB, application/pdf)
2005-08-11 10:11 UTC, Adam Augusta
Details
NoTransparency.PNG - Working NoTransparency case with antialiasing (5.28 KB, image/png)
2005-08-11 10:12 UTC, Adam Augusta
Details
TransparencyNoKnockout.PDF - Non-working transparency case with no knockout (4.24 KB, application/pdf)
2005-08-11 10:13 UTC, Adam Augusta
Details
TransparencyNoKnockout.PNG - No Knockout case with no antialiasing (4.02 KB, image/png)
2005-08-11 10:14 UTC, Adam Augusta
Details
TransparencyKnockout.PDF - Non-working transparency case with knockout (4.32 KB, application/pdf)
2005-08-11 10:15 UTC, Adam Augusta
Details
TransparencyKnockout.PNG - Knockout case with no antialiasing (4.02 KB, image/png)
2005-08-11 10:15 UTC, Adam Augusta
Details
Complex.PDF - Complex Case with Image (1.55 MB, application/pdf)
2005-08-11 10:16 UTC, Adam Augusta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Augusta 2005-08-11 10:10:55 UTC
The problem:
When rasterizing to an image, PDFs that use transparency aren't antialiased
correctly.

Description:
I've included 3 use cases that should look roughly the same.
All three contain:
A blue box
The word 'Hello' in green overlapping the blue box.
The word 'Hello' in blue, overlapping both the previous hello and the blue box.

To render, I use the following command:
gswin32c -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4
-dTextAlphaBits=4 -sOutputFile=foo.png foo.pdf

NoTransparency.pdf renders with flawless antialiasing.
TransparencyKnockout.pdf renders with no antialiasing.
TransparencyNoKnockout.pdf renders with no antialiasing.

(The same symptoms occur if I use ImageMagick to convert to GIF with the default
options.)

The antialiasing shows up correctly for all 3 cases in Adobe Acrobat Reader
versions 5 through 7.  For my application to meet spec, I need antialiasing in
my transparent PDF conversion.

Explanation of cases:
NoTransparency.pdf simply renders pink text on top of green text on top of the box.

TransparencyNoKnockout.pdf renders the blue box, a green rectangle masked by
text, and a pink rectangle masked by text.

TransparencyKnockout.pdf renders the blue box, and a knockout group containing
green text masked by text, and pink text masked by text.

Why would you mask text with text, you ask?  Because I might want that text to
be partially transparent, and I need the text to knock out to the "paper" (which
in this case is white with a blue box), not the text beneath.

A more complicated case with an image has been included as a kind of final check.

Note: (TransparencyNoKnockout and TransparencyKnockout may look slightly
dissimilar, because in latter, the pink text may antialias against the paper,
even where it overlaps the green text.)
Comment 1 Adam Augusta 2005-08-11 10:11:59 UTC
Created attachment 1607 [details]
NoTransparency.PDF - Working case with no transparency
Comment 2 Adam Augusta 2005-08-11 10:12:28 UTC
Created attachment 1608 [details]
NoTransparency.PNG - Working NoTransparency case with antialiasing
Comment 3 Adam Augusta 2005-08-11 10:13:57 UTC
Created attachment 1609 [details]
TransparencyNoKnockout.PDF - Non-working transparency case with no knockout
Comment 4 Adam Augusta 2005-08-11 10:14:44 UTC
Created attachment 1610 [details]
TransparencyNoKnockout.PNG - No Knockout case with no antialiasing
Comment 5 Adam Augusta 2005-08-11 10:15:11 UTC
Created attachment 1611 [details]
TransparencyKnockout.PDF - Non-working transparency case with knockout
Comment 6 Adam Augusta 2005-08-11 10:15:37 UTC
Created attachment 1612 [details]
TransparencyKnockout.PNG - Knockout case with no antialiasing
Comment 7 Adam Augusta 2005-08-11 10:16:39 UTC
Created attachment 1613 [details]
Complex.PDF - Complex Case with Image
Comment 8 Adam Augusta 2005-08-11 10:33:16 UTC
A blue box
The word 'Hello' in green overlapping the blue box.
The word 'Hello' in blue, overlapping both the previous hello and the blue box.

The last Hello is pink, not blue.

I sincerely thank anyone who looks at this for their time.
Comment 9 Adam Augusta 2005-08-11 13:21:28 UTC
I'd forgotten that I submitted a similar bug several months ago, Bug #687674.
Comment 10 Adam Augusta 2005-08-15 14:36:55 UTC
Correction -- PDF 1.4 transparency does *not* work correctly in the earlier 5.0
version of Acrobat.
Comment 11 Stefan Kemper 2005-08-17 09:40:40 UTC

*** This bug has been marked as a duplicate of 687674 ***