i have a problem !

[email protected] ("Chu Hai")
Newsgroups php.webmaster
Message-ID <[email protected]>
Hi Webmaster !
I had some problems as follow:
I have 2 pictures:
1- Frame (.png): was chiseled (empty inside) Transparent.
2- Picture (.jpg).
I want to design frame by PHP but when i change frame size by 2 functions
imagecopyresampled() and imagecopyresized(), My frame have a probem - A
transparent inside frame with picture.png is painted with black color and
with picture.gif is wihite color.
Please direct me to solve this problem I want to change frame size that my
frame is also in transparent status as begining. Thanks so much.

My source :
$img = imagecreatefromjpeg($cachepath.$file);
        $w = imagesx($img);
        $h = imagesy($img);
        $watermark = imagecreatefrompng($background_file);
        $watermarkwidth =  imagesx($watermark);
        $watermarkheight =  imagesy($watermark);

        $frame = imagecreatetruecolor($w, $h);
        imagecopyresampled($frame, $watermark, 0, 0, 0, 0,$w, $h,
$watermarkwidth, $watermarkheight);

        imagecopy($img, $frame,  0, 0, 0, 0, $w, $h);
        imagejpeg($img, $cachepath.$newfile, 100);

Please tutorial in a specific. Thanks so much.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.