More on gs transparency
Bruno Voisin
bvoisin at icloud.com
Tue Apr 21 19:26:18 CEST 2020
Today an official "statement" has been made that the .setopacityalpha and .setshapealpha operators are deprecated in the development version of Ghostscript. See the last entry at
https://bugs.ghostscript.com/show_bug.cgi?id=702219
The doc has been updated
https://www.ghostscript.com/doc/current/Language.htm#Transparency
and mentions the change as effective in the next version, 9.53.
The respective replacements seem to be .setfillconstantalpha and .setstrokeconstantalpha.
I have tested the development version (downloaded and compiled a few minutes ago) with the built-in Ghostscript example (examples/transparency_example.ps in the source code) and with the attached two files, posted by Herbert Voss and in which I have replaced .setopacityalpha by .setfillconstantalpha:
- Calling gs with -dALLOWPSTRANSPARENCY (for example "gs -q -dNOPAUSE -dBATCH -dALLOWPSTRANSPARENCY -sDEVICE=pdfwrite -sOutputFile=transparency_example.pdf transparency_example.ps"), transparency is obtained as expected.
- Calling gs with -dSAFER (the default) or -dNOSAFER, transparency_example.ps yields
%%%% WARNING: Transparency operations ignored - need to include -dALLOWPSTRANSPARENCY
and the other two test files yield
Error: /undefined in .setfillconstantalpha
In all three cases output is obtained, without transparency.
Bruno Voisin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.ps
Type: application/postscript
Size: 365 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20200421/e9531661/attachment.ps>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.ps
Type: application/postscript
Size: 194 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20200421/e9531661/attachment-0001.ps>
More information about the tex-live
mailing list.