Re: FW: Merging two images (GD & PNG)

From: Date: Wed, 30 Nov 2005 16:39:50 +0000
Subject: Re: FW: Merging two images (GD & PNG)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-226652@lists.php.net to get a copy of this message
Albert wrote:
Jochem Maas wrote:
imagecreatetruecolor() is probably what your after: http://php.net/imagecreatetruecolor Albert wrote:
Notes: 1. When using imagecreatetruecolor the images turn black
I did try imagecreatetruecolor() but then the images turn black.
the output image resource you create should be created with $xxx = imagecreatetruecolor(1000,1000), you should call imagealphablending($xxx, true) on the output image resource after you create and before copying [which you are as far as I can tell], and you should use imagecopyresampled() to actually copy the image data into the final image (instead of imagecopy()). try this site: http://php.amnuts.com/ I use a very hacked up version of his image masking class to do similar things to what you want to do.
Albert


« previous php.general (#226652) next »