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 –