Query: imagecreate
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IMAGECREATE(3) 1 IMAGECREATE(3) imagecreate - Create a new palette based imageSYNOPSISresource imagecreate (int $width, int $height)DESCRIPTIONimagecreate(3) returns an image identifier representing a blank image of specified size. In general, we recommend the use of imagecreatetruecolor(3) instead of imagecreate(3) so that image processing occurs on the highest qual- ity image possible. If you want to output a palette image, then imagetruecolortopalette(3) should be called immediately before saving the image with imagepng(3) or imagegif(3).PARAMETERSo $width - The image width. o $height - The image height.RETURN VALUESReturns an image resource identifier on success, FALSE on errors.EXAMPLESExample #1 Creating a new GD image stream and outputting an image. <?php header("Content-Type: image/png"); $im = @imagecreate(110, 20) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($im, 0, 0, 0); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); imagepng($im); imagedestroy($im); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Creating a new GD image stream and outputting an image.SEE ALSOimagedestroy(3), imagecreatetruecolor(3). PHP Documentation Group IMAGECREATE(3)
Related Man Pages |
---|
imagepolygon(3) - php |
imageellipse(3) - php |
imagefilledellipse(3) - php |
imagegd(3) - php |
imagegd2(3) - php |
Similar Topics in the Unix Linux Community |
---|
Creating a header. |
Getting image properties |
Creating a file within a file? |
Compression (gzip) for image analysis |
Help with blobbing |