Bug Report: Argument decodearray of includegraphics is misinterpreted in LuaLaTeX
Ulrike Fischer
news3 at nililand.de
Thu Dec 19 17:11:52 CET 2024
Am Thu, 19 Dec 2024 09:06:04 +0000 schrieb Köb Hanna STAR:
> Dear Sir or Madam,
>
> I want to report a bug for LuaLaTeX, it seems that the argument decodearray in includegraphics from the package graphicx is misinterpreted. If I pass the decodearray = {0 0 0 0 0 0}, I would expect, that every color used in this image gets black. This is the case when compiling with pdfLaTeX or XeLaTeX, but compiling with LuaLaTeX, the image in the resulting PDF is completely transparent. Attached you will find an example to reproduce the issue.
>
> Best regards
> Hanna Köb
This looks like a bug in the luatex engine and you should report
that to the luatex mailing list.
luatex adds the Decode value both to the XObject and the Smask. So
the plaintex version
\pdfvariable compresslevel=0
\pdfvariable objcompresslevel=0
\saveimageresource attr { /Decode [0 0 0 0 0 0] } {Stoerung.png}
\useimageresource\lastsavedimageresourceindex
aaa
\bye
gives
1 0 obj
<< /Type /XObject /Subtype /Image
/Decode [0 0 0 0 0 0] %<------------------
/Width 400 /Height 400 /BitsPerComponent 8 /ColorSpace /DeviceRGB
/SMask 7 0 R /Length 480000 >>
stream
endstream
endobj
7 0 obj
<< /Type /XObject /Subtype /Image
/Decode [0 0 0 0 0 0] %<------------
/Width 400 /Height 400 /BitsPerComponent 8 /ColorSpace /DeviceGray
/Length 160000 >>
stream
The equivalent pdftex code
\pdfcompresslevel=0
\pdfobjcompresslevel=0
\pdfximage attr { /Decode [0 0 0 0 0 0] } {Stoerung.png}
\pdfrefximage\the\pdflastximage
aaa
\bye
adds the Decode only to the Smask:
<<
/Decode [0 0 0 0 0 0] %<-----------
/Type /XObject
/Subtype /Image
/Width 400
/Height 400
/BitsPerComponent 8
/ColorSpace /DeviceRGB
/SMask 8 0 R
/Length 480000
>>
stream
endstream
endobj
8 0 obj
<<
/Type /XObject
/Subtype /Image
/Width 400
/Height 400
/BitsPerComponent 8
/ColorSpace /DeviceGray
/Length 160000
>>
stream
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
More information about the tex-live
mailing list.