Home > PHP > Function > GD > imagegd()

imagegd()

imagegd - Output GD image to browser or file

Syntax

bool imagegd (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

Outputs a GD image to the given filename.

Version

PHP 4.0.7, 5

Return value

Returns TRUE on success or FALSE on failure.