What is Web±à³Ì Readers Blog?

    Web±à³Ì Readers Blog¼¯ÖÐÁËWeb×ÊÉî³ÌÐòÔ±µÄ¼¼ÇɺÍʵս¾­Ñ飬º­¸ÇÁËWeb±à³ÌµÄÈ«²¿·¶Î§: 3P(ASP, JSP, PHP) web±à³Ì¼¼Êõ£¬MySQLÊý¾Ý¿â¿ª·¢£¬·þÎñÆ÷ÍøÂ簲ȫºÍDIV+CSS²¼¾ÖµÈ£¬ÌṩһЩÓÅÐãµÄ±à³ÌÔ´Â룬ʹÄúµÄWeb±à³Ìѧϰ֮·¸ü¼Óƽ̹¡£

ä¯ÀÀģʽ: ±ê×¼ | Áбí

PHP³£¼ûͼÐβÙ×÷ Íæ×ªÍ¼Ïñº¯Êý¿â(Èý) - PHPͼÏñʵÀý¶þ

Submitted by ×÷Õß: admin 2008-08-26 10:38:23

PHPͼÏñʵÀý¶þ: ÒõÑôͼ
Ö÷ÒªÓõ½µÄPHPͼÏñº¯Êý:imagecreatetruecolor()¡¢imagecolorallocate()¡¢imagefill()¡¢imagefilledellipse().
<?php
$width=400;
$height=400;
$image=imagecreatetruecolor($width,$height);
//ÌáÈ¡ÑÕÉ«
$color_black=imagecolorallocate($image,0,2,0);//
$color_white=imagecolorallocate($image,255,255,255);//°×É«
$color_blue=imagecolorallocate($image,0,0,108);//À¶É«
$color_red=imagecolorallocate($image,151,0,4);//ºìÉ«
$color_my=imagecolorallocate($image,192,192,255);//±³¾°
$color_temp=imagecolorallocate($image,199,199,199);//±³¾°
//×÷ͼ
imagefill($image,0,0,$color_white);
//µÚÒ»¸öÊÇ´óÔ²
imagefilledarc ($image,$width/2,$height/2,$height,$height,0,360,$color_blue,IMG_ARC_PIE);
//Á½¸öСԲ
imagefilledellipse ($image,$width/2,$height/4 ,$height/2,$height/2,$color_red);
imagefilledellipse ($image,$width/2,$height/4 * 3,$height/2,$height/2,$color_blue);
/*imagefilledellipse -- »­Ò»ÍÖÔ²²¢Ìî³ä*/
imagefilledarc ($image,$width/2,$height/2,$height,$height,-90,90,$color_red,IMG_ARC_PIE);
imagefilledellipse ($image,$width/2,$height/4 * 3,$height/2,$height/2,$color_blue);
//·¢ËͶÔÏóÖÁÍ·
header('content-type:image/png');
imagepng($image);
/*
//·¢ËͶÔÏóÖÁÎļþ
$filename="ex1.png";
imagepng($image,$filename);
*/
//Ïú»Ù¶ÔÏó
imagedestroy($image);
?>

¡¡¡¡PHP³£¼ûͼÐβÙ×÷ Íæ×ªÍ¼Ïñº¯Êý¿â

·ÖÀà:ÍøÕ¾|PHPѧϰ | Read more ÔĶÁ (118) ÆÀÂÛ (0)





·Ã¿Í ÆÀÂÛ





·¢±íÆÀÂÛ

êÇ¡¡³Æ (±ØÌî)

ÓÊ¡¡Ïä (±ØÌî)

Íø Õ¾

ÑéÖ¤Âë: (±ØÌî)