close

 

簡單的函數為灰度圖像
function imagecolorgrey( &$img ) {
for( $i=0; $i<imagecolorstotal( $img ); $i++ ) {
$c = ImageColorsForIndex( $img, $i );
$t = ($c["red"]+$c["green"]+$c["blue"])/3;
imagecolorset( $img, $i, $t, $t, $t );
}
}

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 stockwfj3 的頭像
    stockwfj3

    程式設計@筆記

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