|
Posted by Rami Elomaa on 03/19/07 21:09
Chuck Anderson kirjoitti:
> Is it possible to overlay a transparent watermark on an image -
> dynamically?
> I'd like the result to look like this example:
> <http://www.cycletourist.com/temp/photo.php>
>
> That is a bit of overkill, but you can see what I mean. The watermark
> image (a png image) is included separately below the photo.
>
> I tried using a class from phpclasses.org
> <http://www.phpclasses.org/browse/package/1580.html> ...
> but the result looks horrible. The transparency does not work.
>
> I found one other method through Google,
> <http://www.sitepoint.com/article/watermark-images-php>
> but it did not work, either.
>
> Can this kind of transparent overlay be done on the fly with GD lib?
>
Yeah, I've done this. What you do is you open image handles to both
files, the original image (imagecreatefromjpg) and the png watermark
(imagecreatefrompng), then combine them with either imagecopy,
imagecopyresampled or some other imagecopy* function that works best for
you. Just go ahead and try them.
--
Rami.Elomaa@gmail.com
"Olemme apinoiden planeetalla."
Navigation:
[Reply to this message]
|