I solved my problem.
How?
And I decided to look deeper.
Original image is base64 encoded string, like this:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAABGdBTUEAAYagMeiWXwAAADRJREFUeJztwQENAAAAwqD3T20ON6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH4MdZQAAahQ8jkAAAAASUVORK5C/4I=
I don't understand what you want to say...
In the meantime, I investigated myself. There is a program PNGAnalyzer (
http://wolfgangfellger.de/de/product,4) which also reports the CRC issue and is able to fix it - afterwards the file is readable by standard Lazarus code.
I temporarily bypassed the crc check in the fpc png reader (fpreadpng.pp), and this made the original file being readable immediately.
So, should fpreadpng be extended to bypass the crc check? (I think now that it is this what you wanted to say (in an non-understandable way) by citing Delphi code). I don't think we should. The crc check is the sanity check of the file. If it fails there is some chance that it has been modified for example to inject buffer overflow etc. I uploaded the file to VirusTotal, it seems to be clean. But it could have been an attack. In my opinion, all the programs which had opened the file without any notice have a security risk regarding manipulated png files.