Hello,
I have problem with merging watermark on image.
When i make merge and to merge quality to 30 then it makes merge not transperant but darker.
Can some1 tell me what the problem can be?

Here is my script:

Code:
function makeIMG($scrFile,$dstFile) {
    $tal = 300;
    $mergequality = 30;
    $imgquality = 100;
    $watermark = imagecreatefromgif("images/merge.gif");
    $watermark_width = imagesx($watermark);
    $watermark_height = imagesy($watermark);
    $img = imagecreatefromjpeg($scrFile);
    $size = getimagesize($scrFile);
    $srcW = imagesx($img);
    $srcH = imagesy($img);
        $ratio = $srcH / $srcW;
        $dest_x = ($size[0] / 2) - ($watermark_width / 2);
        $dest_y = ($size[1] / 2) - ($watermark_height / 2);
        $srcH = abs($srcW * $ratio);

        //PHPINFO
        ob_start();
        phpinfo(8);
        $phpinfo=ob_get_contents();
        ob_end_clean();
        $phpinfo=strip_tags($phpinfo);
        $phpinfo=stristr($phpinfo,"gd version");
        $phpinfo=stristr($phpinfo,"version");
        $end=strpos($phpinfo,".");
        $phpinfo=substr($phpinfo,0,$end);
        $length = strlen($phpinfo)-1;
        $phpinfo=substr($phpinfo,$length);
        //PHPINFO END

        if($phpinfo<2){
            $dst = imageCreate($srcW, $srcH);
        }else{
            $dst = imageCreateTrueColor($srcW, $srcH);
        }
        imagecopyresized($dst,$img,0,0,0,0,$srcW,$srcH,imagesx($img),imagesy($img));
        imagecopymerge($dst, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $mergequality);
        imagejpeg($dst, $dstFile, $imgquality);