imagecopymergegray

(PHP 4 >= 4.0.6, PHP 5)

imagecopymergegray -- 用灰階複製併合併圖像的一部分

說明

bool imagecopymergegray ( resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct )

src_im 圖像中坐標從 src_xsrc_y 開始,寬度為 src_w,高度為 src_h 的一部分複製到 dst_im 圖像中坐標為 dst_xdst_y 的位置上。兩圖像將根據 pct 來決定合併程度,其值範圍從 0 到 100。當 pct = 0 時,實際上什麼也沒做,當為 100 時本函數和 imagecopy() 完全一樣。

本函數和 imagecopymerge() 完全一樣只除了合併時通過在複製動作前將目的像素轉換為灰階級來保留了原色度。

注: 本函數增加於 PHP 4.0.6。