I tried this unit with Next3D. Took some jpg, scaled it down to 512x1024 and saved as PNG using Gimp and max compression. Result was correct image when it comes to colors but it only loaded correctly 5% of the top part line by line and it drew it upside down. Rest 95% of the image was the same as last read line.

I tried with my original engine code (freepascal's unit) first which drew it without problems.

Edit: Now.. explained the format bit wrong. Later i added pixel wide corners and some text by hand using MsPaint and saved it in PNG again. That is different format than what gimp used and caused the above explained behavior.

But now i re-saved the same image with Gimp max compression and the loader give access violation. I commented out everything else so it's certainly in the png unit. It pops cpu window so i can't debug exactly where.