Bug 693024 - PDF to PNG: transparency rendered white
Summary: PDF to PNG: transparency rendered white
Status: RESOLVED DUPLICATE of bug 687630
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Other Driver (show other bugs)
Version: 9.05
Hardware: All Linux
: P4 normal
Assignee: Michael Vrhel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-03 23:59 UTC by JFPlante
Modified: 2014-02-19 07:16 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
pdf with the transparency problem (20.96 KB, application/pdf)
2012-05-03 23:59 UTC, JFPlante
Details
result of conversion to png (40.93 KB, image/png)
2012-05-04 00:00 UTC, JFPlante
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JFPlante 2012-05-03 23:59:42 UTC
Created attachment 8572 [details]
pdf with the transparency problem

The following pdf is a red circle and rectangle over a transparent background:
http://publicly-shared.s3.amazonaws.com/pdf_with_transparency.pdf

When rendering it as a png, the red square and circle are rendered over a white square. Here is the command i am using
gs -dNOPAUSE -dBATCH -sDEVICE=pngalpha -sOutputFile=pdf_with_transparency.png pdf_with_transparency.pdf
Comment 1 JFPlante 2012-05-04 00:00:16 UTC
Created attachment 8573 [details]
result of conversion to png
Comment 2 JFPlante 2012-05-04 00:04:11 UTC
This pdf was created with Adobe Photoshop. I have a number of more complex pdfs exhibiting the same problem.
When creating the pdf with 2 layers in photoshop (one for the square, one for the rectangle), the conversion works properly. After flattening the layers to a combined rectangle and circle shape, the problem appears.
Comment 3 Alex Cherepanov 2012-05-05 17:30:50 UTC
This is a problem in pngalpha device.

The file consists of a single image with a soft mask.
pngalpha device marks the whole image as opaque instead of using the
soft mask.
Comment 4 JFPlante 2012-05-07 05:11:04 UTC
Thanks! Let me know if you want me to test additional files...
Comment 5 JFPlante 2012-07-25 13:26:48 UTC
Alex: any progress on that?
Comment 6 Ray Johnston 2014-02-18 11:21:04 UTC

*** This bug has been marked as a duplicate of bug 687630 ***
Comment 7 Ray Johnston 2014-02-19 07:16:43 UTC
This has been fixed by commit: 174cfd1
   Fix pngalpha when PDF has transparency. Bugs 687630, 693024 and 695042.