(PHP 3, PHP 4 )
ImageCreate -- パレットを使用する新規画像の作成
説明
int
imagecreate ( int x_size, int y_size)
ImageCreate()は、x_size
対y_sizeの空の画像を表わす画像IDを返します。
例 1
新規にGDイメージストリームを作成し、イメージを出力します。
<?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);
?> |
|