【php开源代码栏目提醒】:网学会员为广大网友收集整理了,CreateImg.php,希望对大家有所帮助!
<?php
$height = 300;
$width = 300;
$im = ImageCreateTrueColor($width, $height);
$white = ImageColorAllocate ($im, 255, 255, 255);
$blue = ImageColorAllocate ($im, 0, 0, 64);
ImageFill($im, 0, 0, $blue);
//ImageLine($im, 0, 0, $width, $height, $white);
ImageString($im, 10, 100, 120, 'Hello,
PHP', $white);
Header ('Content-type: image/png');
ImagePng($im);
ImageDestroy($im);
?>