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/

_______________________________________________
dev-luatex mailing list
dev-luatex@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to