Re: imagecopy() no errors, but does nothing :-(
| From: | Philip Hallstrom | Date: | Mon, 20 May 2002 22:39:52 +0000 |
| Subject: | Re: imagecopy() no errors, but does nothing :-( | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98539@lists.php.net to get a copy of this message | ||
take a look at ImageAlphaBlending()
On Mon, 20 May 2002, Evan wrote:
> Here is how i fixed the problem:
>
> //Adding logo
> $dst_im = @ImageCreateFromJPEG("../".$pathImg.$NomeFile);
> $src_im = @ImageCreateFromPNG("../imgsite/logoxmail.png");
> $dst_size = GetImageSize("../".$pathImg.$NomeFile);
> $src_size = GetImageSize("../imgsite/logoxmail.png");
> ImageCopy( $dst_im, $src_im, 0, $dst_size[1] - $src_size[1], 0, 0,
> $src_size[0], $src_size[1]);
> //*******this makes the difference!!!!!
> ImageJPEG($dst_im,"../".$pathImg.$NomeFile);
> ImageDestroy($dst_im);
>
> But now I have another question:
> how to mantain the transparency of the png (src_im)?
>
> Evan
>
> "Evan" <evan80@libero.it> ha scritto nel messaggio
> news:20020520202804.16491.qmail@pb1.pair.com...
> > What I'm planning to do is to add the logo of the site over every image
> > uploaded.
> > Here is the code after upload:
> >
> > $dst_im = @ImageCreateFromJPEG ("../".$pathImg.$NomeFile);
> > $src_im = @ImageCreateFromJPEG ("../imgsite/logo.jpg");
> > $dst_size = GetImageSize("../".$pathImg.$NomeFile); //800x600
> > $src_size = GetImageSize("../imgsite/logo.jpg"); //50x50
> > ImageCopy( $dst_im, $src_im, 150, 150, 0, 0, 50, 50);
> >
> > I don't get errors but it happens nothing to the original img ($dst_im).
> > The image logo.jpg is 50x50 and the $dst_img is 800x600.
> >
> > Thanks for your help,
> > Evan
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>