0
我正在使用此代码来标记图像,然后将其保存为水标记。当我尝试为gif图像添加水印时,问题出在我得到的只是该gif的第一帧。php imagecopy不能使用gif图像
imagecopy(
// source
$main_image,
// destination
$logoImage,
// destination x and y
$imageWidth-$logoWidth, $imageHeight-$logoHeight,
// source x and y
0, 0,
// width and height of the area of the source to copy
$logoWidth, $logoHeight);
if($type == "png"){imagepng($main_image, $new_path);}
if($type == "jpeg"){imagejpeg($main_image, $new_path);}
if($type == "gif"){imagegif($main_image, $new_path);}
如何解决此问题?
http://stackoverflow.com/search? q =%5Bphp%5D + watermark + gif –
与PHP捆绑在一起的GD库不支持动画GIF。 – BenM
ImageMagick确实如此:http://stackoverflow.com/questions/10531514/watermark-on-animated-gif-with-php –