imagecreatetruecolor

Create a new true color image

&reftitle.description; ``GdImage``false```imagecreatetruecolor` `int` `width` `int` `height`

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

&reftitle.parameters;

`width`

- Image width.

`height`

- Image height.

&reftitle.returnvalues;

&gd.return.identifier;

&reftitle.changelog;

&Version; | &Description;
8.0.0 | On success, this function returns a `GDImage` instance now; previously, a `resource` was returned.

&reftitle.examples;

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

    <?php
    header ('Content-Type: image/png');
    $im = @imagecreatetruecolor(120, 20)
          or die('Cannot Initialize new GD image stream');
    $text_color = imagecolorallocate($im, 233, 14, 91);
    imagestring($im, 1, 5, 5,  'A Simple Text String', $text_color);
    imagepng($im);
    imagedestroy($im);
    ?>

&example.outputs.similar; Output of example : Creating a new GD image stream and outputting an image.
&reftitle.seealso;

- `imagedestroy`
- `imagecreate`