imagecreatetruecolor

Create a new true color image

Beschreibung

resource imagecreatetruecolor ( int $width , int $height )

imagecreatetruecolor returns an image identifier representing a black image of the specified size.

Parameter-Liste

width

Image width.

height

Image height.

Rückgabewerte

Gibt im Erfolgsfall eine Bildresource zurück, im Fehlerfall FALSE.

Beispiele

Beispiel #1 Creating a new GD image stream and outputting an image.

<?php
header 
('Content-Type: image/png');
$im = @imagecreatetruecolor(12020)
      or die(
'Cannot Initialize new GD image stream');
$text_color imagecolorallocate($im2331491);
imagestring($im155,  'A Simple Text String'$text_color);
imagepng($im);
imagedestroy($im);
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Output of example : Creating a new GD image stream and outputting an image.

Siehe auch

  • imagedestroy
  • imagecreate