您好,登錄后才能下訂單哦!
2017,1,3,星期二
一、所需的代碼,步驟:
1.新建畫布[新建圖像]
resource p_w_picpathcreatetruecolor ( int $width , int $height );
2.選取顏色
int p_w_picpathcolorallocatealpha ( resource $p_w_picpath , int $red , int $green , int $blue , int $alpha );
3.畫圖
bool p_w_picpathellipse ( resource $p_w_picpath , int $cx , int $cy , int $width , int $height , int $color )
4.區(qū)域填充
bool p_w_picpathfill( resource $p_w_picpath
, int $x
, int $y
, int $color
);
5.生成隨機數(shù)
int mt_rand( int $min
, int $max
);
6.隨機打亂一個字符串
string str_shuffle( string $str
);
7.用 TrueType 字體向圖像寫入文本
array p_w_picpathttftext ( resource $p_w_picpath
, float $size
, float $angle
, int $x
, int $y
, int $color
, string $fontfile
, string $text
);
8.返回字符串的子串
string substr ( string $string
, int $start
[, int $length
] )
9.發(fā)送原生 HTTP 頭
void header ( string $string
[, bool $replace
= true [, int $http_response_code
]] );
10.以 PNG 格式將圖像輸出到瀏覽器或文件
bool p_w_picpathpng ( resource $p_w_picpath
[, string $filename
] );
11.銷毀一圖像
bool p_w_picpathdestroy ( resource $p_w_picpath
);
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。