Bug 692617

Summary: removing transparencies makes image black
Product: Ghostscript Reporter: Matteo Gamboz <gamboz>
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P4    
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: removing transparency makes the image black
output of various viewer

Description Matteo Gamboz 2011-10-20 09:42:27 UTC
Created attachment 8025 [details]
removing transparency makes the image black

The following command on the attached image makes it black when the result is viewed with gv (3.7.2) or acrobat reader (9.4 and 10). Other viewers show the image "correctly".

gs -o modified.pdf -sDEVICE=pdfwrite -dHaveTransparency=false original.pdf

This behavior can be observed with gs 9.04 and 9.05, but not with 8.71.

I'm not sure, but this may be similar to 689996.
Comment 1 Matteo Gamboz 2011-10-20 09:43:05 UTC
Created attachment 8026 [details]
output of various viewer
Comment 2 Ken Sharp 2011-10-20 10:14:50 UTC
(In reply to comment #0)
 
> I'm not sure, but this may be similar to 689996.

Nothing to do with 689996 but this is a duplicate of #692613.

*** This bug has been marked as a duplicate of bug 692613 ***
Comment 3 Ray Johnston 2011-10-20 14:43:30 UTC
BTW, there is no -dHaveTransparency=false option.

Did you mean -dNOTRANSPARENCY ??? This option ignores all transparency
commands in the original.pdf, which will give incorrect results if it used
transparency.

If you were trying to convert original.pdf that had transparency to a PDF that
does not have tranparency, you will want to set -d-dCompatibilityLevel=1.3
since PDF 1.4 is the first version that supports transparency. Then pdfwrite
will 'flatten' the original PDF by rendering the transparency areas as an
image.
Comment 4 Ken Sharp 2011-10-20 15:50:30 UTC
(In reply to comment #3)
> BTW, there is no -dHaveTransparency=false option.

There is for pdfwrite. Its normally controlled by the CompatibilityLevel, setting it to 1.3 sets HaveTransparency false.

Its part of the move to stop testing device names, and have parameters instead ;-)


> Did you mean -dNOTRANSPARENCY ??? This option ignores all transparency
> commands in the original.pdf, which will give incorrect results if it used
> transparency.

This one works differently, its supposed to render the transparent portions to an image. So the output should look the same (at a given resolution) but not contain transparent objects.

> since PDF 1.4 is the first version that supports transparency. Then pdfwrite
> will 'flatten' the original PDF by rendering the transparency areas as an
> image.

Yes, has the same effect, I would much prefer that the CompatibilityLevel is used rather than the HaveTransparency parameter.