![]() |
Watermaking Images
Hey all, time for another GD tutorial. This time i am going to go through "watermarking" your images.
DEMO: HERE Firstly create a watermark image and save it as png-24 for best quality. Firstly of course we want to set the actual image we want to watermark. PHP Code:
Next we want to create the watermark image and load it up into RAM. PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
This script can easily be used by using the following script. PHP Code:
FULL CODE PHP Code:
|
Once again, a very nice article! You really should start a fan club Dale. :-P
Can you extend this function that you can either use text, or upload an PNG/GIF (transparent) image and then watermark it that way? Since I've got my own logo and all! Keep it up man! Talk to ya on MSN. :-) Mark |
Quote:
I shall expand on that script to do the things you wish and among other things. :-) |
Thanks Will look into this :).
|
Warning: imagesx(): supplied argument is not a valid Image resource in /usr/hosts/domains/propaket/bodrumlife_pro/www.forumistan.net/httpdocs/sifreli/Yansima/process_thumb.php on line 11
Warning: imagesy(): supplied argument is not a valid Image resource in /usr/hosts/domains/propaket/bodrumlife_pro/www.forumistan.net/httpdocs/sifreli/Yansima/process_thumb.php on line 12 Warning: imagecopy(): supplied argument is not a valid Image resource in /usr/hosts/domains/propaket/bodrumlife_pro/www.forumistan.net/httpdocs/sifreli/Yansima/process_thumb.php on line 20 Warning: Cannot modify header information - headers already sent by (output started at /usr/hosts/domains/propaket/bodrumlife_pro/www.forumistan.net/httpdocs/sifreli/Yansima/process_thumb.php:11) in /usr/hosts/domains/propaket/bodrumlife_pro/www.forumistan.net/httpdocs/sifreli/Yansima/process_thumb.php on line 22 Warning: imagejpeg(): supplied argument is not a valid Image resource in /usr/hosts/domains/propaket/bodrumlife_pro/www.forumistan.net/httpdocs/sifreli/Yansima/process_thumb.php on line 23 Warning: imagedestroy(): supplied argument is not a valid Image resource in /usr/hosts/domains/propaket/bodrumlife_pro/www.forumistan.net/httpdocs/sifreli/Yansima/process_thumb.php on line 24 |
Quote:
I would say this means the version of PHP you are using or GD isn't up to date or higher |
The errors listed by CΛSTΞX would occur if the file cannot be loaded in the line:
$image=imagecreatefromjpeg($file); Perhaps introduce some basic condition and/or error checking to prevent errors piling up on top of themselves. |
So what should I do ? Is it possible for me to run this script ?
|
I don't see why not. Just point your code to image and watermark files that are on your server and everything should be fine.
|
| All times are GMT. The time now is 07:21 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0