ImageCreate

(PHP 3, PHP 4 )

ImageCreate -- Create a new palette based 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.

P°φklad 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);
?>