Error with 'luaimageembed' on Windows
Max Chernoff
mseven at telus.net
Fri Jun 23 00:02:59 CEST 2023
Hi Rolf,
> I get the following error on Windows:
>
> output_filename=luatex.3ah000/image1.png
> libpng error: PNG file corrupted by ASCII conversion
That error, along with these lines from luaimageembed.sty
ltn12.pump.all(
ltn12.source.string(data),
ltn12.sink.chain(
mime.decode("base64"),
ltn12.sink.file(io.open(file_name, "a"))
)
)
local file = io.open(file_name, "rb")
makes me think that it's replacing all the LFs with CRLFs on Windows.
Can you try changing line 31 of luaimageembed.sty from
ltn12.sink.file(io.open(file_name, "a"))
to
ltn12.sink.file(io.open(file_name, "ba"))
(untested)
Thanks,
-- Max
More information about the tex-live
mailing list.