imagecreate

imagecreate,說明,

imagecreate

(PHP 3, PHP 4 )
imagecreate -- 新建一個基於調色板的圖像

說明

resource imagecreate ( int x_size, int y_size)
imagecreate() 返回一個圖像標識符(資源型變數),代表了一幅大小為 x_sizey_size 的空白圖像。
推薦使用 imagecreatetruecolor()
imagecreate用於新建一個新的 GD 圖像流並輸出圖像 <?php
header ("Content-type: image/png");
$im = @imagecreate (50, 100)
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);
?>

相關詞條

熱門詞條

聯絡我們