(PHP 4, PHP 5, PHP 7)
Output image to browser or file
bool imagegif ( resource $image [, string $filename ] )
imagegif() creates the GIF file in filename from the image image. The image argument is the return from the imagecreate() or imagecreatefrom* function.
The image format will be GIF87a unless the image has been made transparent with imagecolortransparent(), in which case the image format will be GIF89a.