Nice one, i thought i was stuck on using an .dll or .so file with using png.
Can i use your code with code that is under the mozilla public license?