imageCopy :-(
| From: | jtjohnston | Date: | Sat, 10 Nov 2001 11:14:51 +0000 |
| Subject: | imageCopy :-( | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-74096@lists.php.net to get a copy of this message | ||
Not that I'm sleep deprived ... :o)
Simple, I create an image, add a bunch of text and what not.
Now I want to add a graphic. (Probably a couple, who knows?)
imageCopy("test.bmp",$image,10,10,10,10,350,500,50); <== doesn't
work.
Is this even the right function??
Description:
int ImageCopyMerge (resource dst_im, resource, src_im,
int dst_x, = 10
int dst_y, = 10
int src_x, = 10
int src_y, = 10
int src_w, = 350
int src_h, = 500
int pct = 50
)
So what am I doing wrong?
--------snip-----------
header("Content-type: image/png");
$height = 350;
$width = 500;
$image = imagecreate($width, $height+350);
$white = imagecolorallocate($image, 255, 255, 255);
$red = imagecolorallocate($image, 255, 0, 0);
$green = ImageColorAllocate($image, 0, 255, 0);
$blue = ImageColorAllocate($image, 0, 0, 255);
$black = imagecolorallocate($image, 0, 0, 0);
ImageString($image,5,30, 30 +350, "hello",$blue);
imageCopy("test.bmp",$image,10,10,10,10,350,500,50);
imagepng($image);
imagedestroy($image);