ImageCreate

(PHP3 , PHP4 )

ImageCreate -- Create a new image

Description

int imagecreate (int x_size, int y_size)

ImageCreate() returns an image identifier representing a blank image of size x_size by y_size.

Example 1. Creating a new GD image stream and outputting an image.


<?php
header ("Content-type: image/png");
$im = @ImageCreate (50, 100)
    or die ("Cannot Initialize new GD image stream");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageString ($im, 1, 5, 5,  "A Simple Text String", $text_color);
ImagePng ($im);
?>