(PHP 4, PHP 5, PHP 7)
imagecreate — �½�һ�����ڵ�ɫ���ͼ��
$x_size
, int $y_size
) : resource
imagecreate() ����һ��ͼ���ʶ����������һ����СΪ
x_size
�� y_size
�Ŀհ�ͼ��
�Ƽ�ʹ�� imagecreatetruecolor()��
Example #1 �½�һ���µ� GD ͼ���������ͼ��
<?php
header("Content-type: image/png");
$im = @imagecreate(100, 50)
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);
imagedestroy($im);
?>
�μ� imagedestroy() �� imagecreatetruecolor()��