Query: imagegd
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IMAGEGD(3) 1 IMAGEGD(3) imagegd - Output GD image to browser or fileSYNOPSISbool imagegd (resource $image, [string $filename])DESCRIPTIONOutputs a GD image to the given $filename.PARAMETERSo $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $filename -The path to save the file to. If not set or NULL, the raw image stream will be outputted directly.RETURN VALUESReturns TRUE on success or FALSE on failure.EXAMPLESExample #1 Outputting a GD image <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); // Output the image imagegd($im); // Free up memory imagedestroy($im); ?> Example #2 Saving a GD image <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); // Save the gd image // The file format for GD images is .gd, see http://www.libgd.org/GdFileFormats imagegd($im, 'simple.gd'); // Free up memory imagedestroy($im); ?>NOTESNote The GD format is commonly used to allow fast loading of parts of images. Note that the GD format is only usable in GD-compatible applications.SEE ALSOimagegd2(3). PHP Documentation Group IMAGEGD(3)
Related Man Pages |
---|
imagestring(3) - php |
imagexbm(3) - php |
imagegd(3) - php |
imagerectangle(3) - php |
imagewbmp(3) - php |
Similar Topics in the Unix Linux Community |
---|
Unable to open uploaded image |
Debian: New sdl-image1.2 packages fix arbitrary code execution |
Simple addition, help. |
Monitor Problems |
String Character Manipulation |