Misschien helpt het als ik de complete hulp informatie toevoeg.
Warning! Watermark worked only with GIF, JPG, PNG sources.
"TRUE" background transparency (alpha) possible only for PNG watermark.
Total transparency work in all supported formats.
Required (*) & nonrequired parameters.
* watermarkpath - absolute path to image wich are be used as watermark (applied over image need to be protect for copyrighting).
Also you can easily put watermark image in image uploads folder (see config['image_uploads_url'] in your config.php file) by name watermark.png & it will be detected by default.
* watermarkedimg - url or absolute path of image need to be protect.
Possible use in other Smarty templates, for example in Album template:
{watermark watermarkedimg=`$picture->picture`}
minsize - minimum image size for protection in pixels. Default: 100 px. Need to exclude small pictures, for example images thumbs.
wmposition - watermark position.
Possible some modificators:
* TL - Top left
* TM - Top middle
* TR - Top right
* CL - Center left
* CM - Center
* CR - Center right
* BL - Bottom left
* BM - Bottom middle
* BR - Botton right
Possible also "RND" - random position, but use it on your own risk (if any image will be processed twice or more it will be with watermarks on top right, center and other positions). I'm not garantee that wmlist will be work correctly & always.
backup - possible true or false. Default is true. It save your original pictures in subfolder "backup-images" with htaccess protection.
transp - total watermark transparency, digit from 0 to 100, default is 0 (no transparency).
transpcolor - transparency color in RGB format, not active by default. If you declare it (for example transpcolor='255, 255, 255' i.e white) than it will be excluded from your watermark.
Template calls.
You just need to define how image is calling and make smth like this:
Code: Select all
{watermark watermarkedimg=`$picture->picture`}
<img src="{$picture->picture}" alt="{$picture->name}" name="maincmotionpic"
width="640" id="maincmotionpic" title="{$picture->comment|strip_tags} | © {sitename}" />
and before show image by adress {$picture->picture} it will be watermarked by this tag.
If you wish protect standalone image just call {watermark watermarkedimg='your_image_way' wmposition='BL'} before image tag calling, but I don't see any interest of this usage.
Wich interest for usage.
Anyone can add pictures in your Album and you want protect it by watermark(wm). You can add wm by another way, but this way free you from odd action. Just call Watermark before and all work will be done automaticly.
Voor de liefhebber/kenner heb ik alles uit function.watermark.php even aan dit bericht attached (in een .txt).