Closed nanderer closed 1 week ago
Thank you very much for the info! I'll check it out as soon as I can. The demo.png.zip.html
fle is also suferring from the same issue. The strange thing is that https://www.nayuki.io/page/png-file-chunk-inspector tells me that CRCs are OK (it displays a warning when they are not)...
EDIT: I have some doubts that https://www.nayuki.io/page/png-file-chunk-inspector really validates CRCs
I'd be willing to bet it's related to a text encoding issue....
In fact, the mistake was simpler than I guessed. Now the PNG file is valid.
EDIT: I have some doubts that https://www.nayuki.io/page/png-file-chunk-inspector really validates CRCs
It does validate CRCs strictly. It would be easy to test it yourself by opening a PNG file in a hex editor and altering a few bytes.
EDIT: I have some doubts that https://www.nayuki.io/page/png-file-chunk-inspector really validates CRCs
It does validate CRCs strictly. It would be easy to test it yourself by opening a PNG file in a hex editor and altering a few bytes.
This is what I did with the corrupted and the fixed file yesterday but it was 2:00 AM, maybe I was too tired...
For the record, I confirm that no warning messages are displayed when the CRC is wrong on https://www.nayuki.io/page/png-file-chunk-inspector unfortunately. See the screenshots below (done with the old and new demo files). I've sent an email to the author about this issue.
CRC OK:
Bad CRC:
I see that the humongous amount of tEXt
is causing a visual overflow. Did you try scrolling the web page horizontally to the right?
@nayuki Sorry for the inconvenience, I can confirm that all I had to do was scroll the page to the right. See the screenshot below. Thank you very much for your help :)
@gildas-lormeau Thanks for your patience and understanding. With the help of your tricky test case, I went ahead and fixed the issue with "PNG file chunk inspector" for the long term. Now there are forced line breaks in any potentially long user-supplied text, which makes it far less likely for the rightmost column (error column) of the table to disappear.
@nayuki I confirm your fix works perfectly, thank you very much!
Hi,
i tested optipng on your demo at
https://raw.githubusercontent.com/gildas-lormeau/Polyglot-HTML-ZIP-PNG/main/demo.png.zip.html
the most fascinating thing that i found is that optipng didn't destroy the html part, its really good masked using this tEXtPNG thingy, quite fascinating` what you can do, but it showed a crc error: