close

 

說明

bool imagefill ( resource $image , int $x , int $y , int $color )
imagefill() 在 image 圖像的坐標 x,y(圖像左上角為 0, 0)處用 color 顏色執行區域填充
(即與 x, y 點顏色相同且相鄰的點都會被填充)。


<?php

$im = imagecreatetruecolor(100, 100);

// 將背景設為紅色
$red = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 0, 0, $red);

header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>

arrow
arrow
    全站熱搜

    stockwfj3 發表在 痞客邦 留言(0) 人氣()