My application needs a lot of PNGs and I often mess up my code while trying to work with them. To make my life easier I made one big PNG image in Realword Paint and pasted all t
I've tried writing code to just load a png using libpng. It's pretty horrible to work with.
Try using imlib2 to take care of translating PNG files. it has a Delphi binding, apparently.
If if you get really stuck you could use Inage Magick's separate executable to do the image cropping.