I have a function to stitch two pictures below is my Code
$im = imagecreatefrompng("images/err.png"); $stamp = imagecreatefrompng('images/default.png'); $test = imagecreate(imagesx($stamp)+imagesx($im),imagesy($im)); $orange = imagecolorallocate($test, 255, 255, 255); // image imagecopy($test, $stamp, 0, 0, 0, 0, imagesx($stamp), imagesy($stamp)); imagecopy($test, $im, imagesx($stamp), 0, 10, 0, imagesx($im), imagesy($im)); header("Content-type: image/png"); imagepng($test); 最终的结果是 第二个拼接的图片的颜色都会跟着第一个变化 因为传不片只能文字描述下面假如AB是拼接好的图片 有A和B拼接成 B的颜色本来是红色但是拼接完成之后B的颜色会变成A的颜色
Ab
Reply content:
I have a function to stitch two pictures below is my Code
$im = imagecreatefrompng("images/err.png"); $stamp = imagecreatefrompng('images/default.png'); $test = imagecreate(imagesx($stamp)+imagesx($im),imagesy($im)); $orange = imagecolorallocate($test, 255, 255, 255); // image imagecopy($test, $stamp, 0, 0, 0, 0, imagesx($stamp), imagesy($stamp)); imagecopy($test, $im, imagesx($stamp), 0, 10, 0, imagesx($im), imagesy($im)); header("Content-type: image/png"); imagepng($test); 最终的结果是 第二个拼接的图片的颜色都会跟着第一个变化 因为传不片只能文字描述下面假如AB是拼接好的图片 有A和B拼接成 B的颜色本来是红色但是拼接完成之后B的颜色会变成A的颜色
Ab
The picture is not visible, please do not put the picture in the Code view.