should there be a decode array in the SMask dictionary?
If I run the following with pdftex I get a rather black square (checked in three pdf viewers). With luatex I get a rather light gray square, which looks imho wrong as color values between 0 and 0.2 should be dark. The png can be found here: https://i.stack.imgur.com/8JrYD.png \ifcsname directlua\endcsname \pdfvariable compresslevel 0 \pdfvariable objcompresslevel 0 \saveimageresource attr{/Decode [0 0.2 0 0.2 0 0.2]}{blue_square.png} \useimageresource\the\lastsavedimageresourceindex \else \pdfcompresslevel 0 \pdfobjcompresslevel 0 \pdfximage attr{/Decode [0 0.2 0 0.2 0 0.2]}{blue_square.png} \leavevmode\pdfrefximage \the\pdflastximage \fi \bye pdftex adds a transparency group which is missing in luatex, but it didn't change when I added that manually. The other difference between both engines is that pdftex adds the /Decode array only to the image object dictionary and not also to the Smask dictionary: With pdftex I get as image object dictionary << /Decode [0 0.2 0 0.2 0 0.2] /Type /XObject /Subtype /Image /Width 115 /Height 115 /BitsPerComponent 8 /ColorSpace /DeviceRGB /SMask 8 0 R /Length 39675
and as SMask dictionary << /Type /XObject /Subtype /Image /Width 115 /Height 115 /BitsPerComponent 8 /ColorSpace /DeviceGray /Length 13225
The image dictionary with luatex is identical but the SMask has also a /Decode array: << /Type /XObject /Subtype /Image /Decode [0 0.2 0 0.2 0 0.2] /Width 115 /Height 115 /BitsPerComponent 8 /ColorSpace /DeviceGray /Length 13225 >> If I disable the Decode array by replacing /Decode with /Dexode then the expected dark square appears. -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 12/30/2022 11:44 AM, Ulrike Fischer wrote:
If I run the following with pdftex I get a rather black square (checked in three pdf viewers). With luatex I get a rather light gray square, which looks imho wrong as color values between 0 and 0.2 should be dark. FWIW, I did some quick tests and adding the Decode mask makes it lighter and adding to the main xform makes it darker so what you get with adding to both is some mix between these.
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Ulrike Fischer