Thank you, but I've noticed that I have missed one point and I can't edit the post anymore...
After calling imagepng() one should release the used memory, in many cases this is not really a needed step because the PHP GC does a great work, but it is a good practice;
I've written more tutorials on GD, feel free to look for them in PHP category, or just browse through my Threads...
After calling imagepng() one should release the used memory, in many cases this is not really a needed step because the PHP GC does a great work, but it is a good practice;
PHP Code:
imagepng($img);
# and after that call you can free used memory by calling
imagedestroy($img);
I've written more tutorials on GD, feel free to look for them in PHP category, or just browse through my Threads...