Home > PHP > Function > GD > imagegif()

imagegif()

imagegif - Output image to browser or file

Syntax

bool imagegif (resource $image, string $filename)

Arguments

  • image - An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
  • filename - The path to save the file to. If not set or NULL, the raw image stream will be outputted directly.

Description

imagegif() creates the GIFfile in filename from the image image. The image argument is the return from the imagecreate() or imagecreatefrom*function.

Version

PHP 4, 5

Return value

Returns TRUE on success or FALSE on failure.