I am using imagecreatefrompng() to create thumbnails for images as part of an image gallery uploading script. Everything works as expected (dimension, saving the PNG file where I want it, etc) but when I use it on a PNG image with transparency, imagecreatefrompng() makes the transparent parts of the image black.

Does anyone know of an easy way to fix this problem?

Thanks,
Marcus