1
注知道我做错了这里...但我尝试过3个合并成PNG图像之一,它抛出一个错误PHP:试图合并多个PNG图片一起收到错误
警告:imagepng() [function.imagepng]:GD-PNG错误:在调色板颜色没有在C:\瓦帕\ WWW \吉普车\公共\测试\上线png_2.php 22
$x = 300;
$y = 300;
$final_img = imagecreate($x,$y) or die("Failed in call to
imagecreate()
\n");
$image_1 = imagecreatefrompng('ae.png');
$image_2 = imagecreatefrompng('ad.png');
$image_3 = imagecreatefrompng('ao.png');
imagecopy($image_1, $final_img, 0, 0, 0, 0, $x, $y);
imagecopy($image_2, $final_img, 0, 0, 0, 0, $x, $y);
imagecopy($image_3, $final_img, 0, 0, 0, 0, $x, $y);
imagealphablending($final_img, false);
imagesavealpha($final_img, true);
imagepng($final_img, 'final_img.png');
在你的例子中哪一行是22? – Veger 2010-02-22 13:44:30