class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Could you send me this PNG file, or send me a link to it? What did you use to create the PNG picture?
Your assumption about the multiple transparency layers can be right; in fact, I am not sure that GD can even deal properly with these.
I use this image to test with transparent PNGs. I never manage to have all the tests working fine with it, but I make sure that the resulting images are as good as possible.
Could you send me this PNG file, or send me a link to it? What did you use to create the PNG picture?
Your assumption about the multiple transparency layers can be right; in fact, I am not sure that GD can even deal properly with these.
Some useful resources here and here.