Warning: Creating default object from empty value in /www/wwwroot/sc35.com/blog/wp-content/plugins/paged-comments/paged-comments.php on line 31
2006 8月 Archive - Wang
FV.Zone Project Code

PHP 图形处理函数库

使用本功能需要在编译 PHP 前先安装 GD library。

     Header ( "Content-type: image/gif" );
$im = imagecreate ( 400 , 30 );
$black = ImageColorAllocate ( $im , 0 , 0 , 0 );
$white = ImageColorAllocate ( $im , 255 , 255 , 255 );
imageline ( $im , 1 , 1 , 350 , 25 , $black );
imagearc ( $im , 200 , 15 , 20 , 20 , 35 , 190 , $white );
imagestring ( $im , 5 , 4 , 10 , "Graph TEST!!" , $white );
ImageGif ( $im );
ImageDestroy ( $im );
?> 

Read More »