如何讓帝國cms支持png透明度水印

字號:


    需要修改 e/class/gd.php
    找在大約230行,找到//設定圖像的混色模式
    imagealphablending($ground_im, true);
    if($isWaterImage)//圖片水印
    {
    imagecopymerge($ground_im, $water_im, $posX, $posY, 0, 0, $water_w,$water_h,$w_pct);//拷貝水印到目標文件
    }
    改為
    //設定圖像的混色模式
    imagealphablending($ground_im, true);
    if($isWaterImage)//圖片水印
    {
    if($water_info[2]==3) {
    imagecopy($ground_im, $water_im, $posX, $posY, 0, 0, $water_w,$water_h);//拷貝水印到目標文件
    }else{
    imagecopymerge($ground_im, $water_im, $posX, $posY, 0, 0, $water_w,$water_h,$w_pct);//拷貝水印到目標文件
    }
    }
    這樣就OK了