php: alıyorsanız birlikte birden pngs birleştirmek için çalışıyor hata

1 Cevap php

Ben burada yanlış ne yapıyorum emin Not ... ama birine 3 pngs üzerinde birleştirmek için çalışıyor ve bunun bir hata atıyor im

Warning: imagepng() [function.imagepng]: gd-png hatası: C paletinde hiçbir renkler: \ wamp \ www \ hattında 22 jeep \ public \ test \ png_2.php



$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');

1 Cevap

Sen imagecopy ters için ilk iki argüman var. Sipariş hedef kaynağıdır. Bu düzeltilmesi hatayı çözebilir.

http://php.net/imagecopy