I fixed one problem with your class.

Sometimes IDAT parts in png file can be compressed without some header or with some problems.
That's why Peperzaken used ZLibDecompress.
Today i get the same problem. You can try to convert sample files which i upload and you'll see that second icon converts just with bottom half.
But if i use ZLibDecompress problem gone.
So i fixed that part and include ZLibDecompress into the library.