Bug 692617 - removing transparencies makes image black
Summary: removing transparencies makes image black
Status: RESOLVED DUPLICATE of bug 692613
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: master
Hardware: PC Linux
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 09:42 UTC by Matteo Gamboz
Modified: 2011-10-20 15:50 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
removing transparency makes the image black (137.20 KB, application/force-download)
2011-10-20 09:42 UTC, Matteo Gamboz
Details
output of various viewer (436.39 KB, image/png)
2011-10-20 09:43 UTC, Matteo Gamboz
Details

Note You need to log in before you can comment on or make changes to this bug.
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.