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.
Assuming that your forum will let me insert links here are two of my test files, one which works (600kb), and one which doesn't' (292kb). They are both as supplied to me, not sure what was used to create them.
The one which works is converted to a Jpeg with a white background to replace the transparency layer (as I've set). The one which doesn't work so well is converted to a Jpeg with the top left part of the previously-transparent background in white as set, and the bottom right part of the previously-transparent background in black (default I think).
From a bit of Googling, it seems that GD should support PNG since version 1.6. I can't find too much about multiple transparency, but will run some of the test files from the pngsuite you link to later.
I tried with both your pictures, and ran some tests, but could not replicate the problem you describe.
I don't see any differences between the two images. They both are PNG, True Color, depth 24, etc... Only the flower_carpet_logo image seems to come from MS Office for some reason.
What version of PHP and GD are you running? Maybe you can try to increase the memory for PHP, in php.ini
Could you also paste here the logs for each of your images? (echo $foo->log after processing)Reply
The one which works is converted to a Jpeg with a white background to replace the transparency layer (as I've set). The one which doesn't work so well is converted to a Jpeg with the top left part of the previously-transparent background in white as set, and the bottom right part of the previously-transparent background in black (default I think).
From a bit of Googling, it seems that GD should support PNG since version 1.6. I can't find too much about multiple transparency, but will run some of the test files from the pngsuite you link to later.
Many thanks for your help.
I don't see any differences between the two images. They both are PNG, True Color, depth 24, etc... Only the flower_carpet_logo image seems to come from MS Office for some reason.
What version of PHP and GD are you running? Maybe you can try to increase the memory for PHP, in php.ini
Could you also paste here the logs for each of your images? (echo $foo->log after processing)