Bug 693024

Summary: PDF to PNG: transparency rendered white
Product: Ghostscript Reporter: JFPlante <jfrederic.plante>
Component: Other DriverAssignee: Michael Vrhel <michael.vrhel>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P4    
Version: 9.05   
Hardware: All   
OS: Linux   
Customer: Word Size: ---
Attachments: pdf with the transparency problem
result of conversion to png

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.