I am using this code to water mark an image and then save it water marked. The problem when I try to watermark a gif image the I am getting only the first frame of that 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);}
How do I fix this problem ?