Summary: | pngalpha device breaks transparent edge antialiasing | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Masamichi Hosoda <trueroad> |
Component: | Other Driver | Assignee: | Robin Watts <robin.watts> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 9.20 | ||
Hardware: | PC | ||
OS: | Windows 10 | ||
Customer: | Word Size: | --- | |
Attachments: |
transparent.eps
transparent-gs918.png transparent-gs919.png transparent-gs920.png |
Created attachment 13217 [details]
transparent-gs918.png
Created attachment 13218 [details]
transparent-gs919.png
Created attachment 13219 [details]
transparent-gs920.png
(In reply to Masamichi Hosoda from comment #0) > Created attachment 13216 [details] > transparent.eps > > If I understand correctly, Ghostscript 9.19 broke transparent edge > antialiasing. > > The attached transparent.eps contains some white drawing materials. > I obtained transparent PNG (RGBA PNG) with the following command. PostScript doesn't have a transparent imaging model, so your EPS cannot be transparent (and isn't). What it does, apparently, contain is a number of objects drawn in white. Nothing is drawn on the media beforehand, so the resulting objects are simply white on a normally white background (since, as I said, PostScript doesn't have a transparency model). 9.18 produces a pure white output with the pngalpha device for me (presumably the reporter is viewing with something which has a non-white background), while the current code renders the white objects in shades of grey. 9.19 behaves the same, so this is at least 6 months old. The GraphicsAlphaBits and TextAlphaBits switches are not required to reproduce this, nor the -dSAFER, -dNOPAUSE or -dBATCH switches. Apparently Michael owns that device.... According to git bisect the commit which caused this is d9f041d6fe7eda89364df1424f85ace974ed0fec This was a commit from Robin, so I'm changing the assignment. Fixed in: commit 0aeb0bbd41cc16e70ab6e4b1d56e0c510bf2a758 Author: Robin Watts <robin.watts@artifex.com> Date: Thu Dec 29 13:39:50 2016 +0000 Bug 697423: Fix overflow in pngalpha. The composite creation maths in the copy_alpha method overflowed due to the alpha range being changed from 0..15 to 0..255 in commit d9f041d6fe7eda89364df1424f85ace974ed0fec. Changing to unsigned solves this. |
Created attachment 13216 [details] transparent.eps If I understand correctly, Ghostscript 9.19 broke transparent edge antialiasing. The attached transparent.eps contains some white drawing materials. I obtained transparent PNG (RGBA PNG) with the following command. gswin32c -dSAFER -dEPSCrop -dGraphicsAlphaBits#4 -dTextAlphaBits#4 -dNOPAUSE -dBATCH -sDEVICE#pngalpha -sOutputFile#transparent.png transparent.eps When using Ghostscript 9.18, there is no problem with png output. (transparent-gs918.png) When using Ghostscript 9.20 and 9.19, the transparent edge in png output becomes gray. (transparent-gs920.png, transparent-gs919.png)