Are you sure it is a png? Maybe the format guessing of your picture viewers is stronger.

Have a look into the file and see if the header really looks like png.

Try saving the file in your picture viewer as png and load that from your program. Can you load any other png file?

Joh