auto watermark on images

Bug

What do you mean by 'file names'?

I recently have build this into A brax highslide gallery and that works fine

daydreamer

Did anyone get this to work with file names, could do with it for foldergallery
Thanks
Nick

snark

I suppose it Will not be too difficult,

Btw, this is where i found THE script

http://blog.triphp.com/www/scripts/automark.html

voordeelwb

Thanks! Works perfect

The watermark is now in right corner is it possible to change that to middle or left?




Steven


snark

place a folder inside the folder where the watermark script is..

the watermark script also works on the subfolders.. that way you can point your lightbox module to a subfolder and not show the watermark.png

/media
/fotoalbums
  /- watermark script
  /- watermark.png
  /- subfolder
    /  - picture.jpg
    /  - picture2.jpg
    /  - picture3.png


lightbox - dir : media/fotoalbums/subfolder/

voila



Steven

Hi guys,

Nice script. Works fine but I have two questions. Is it possible not to show the watermark.png itself in the gallery (I'm using Lightbox2) and secondly: I can't seem to manage not to let the watermark show on the thumbs.
This is what it says in the htaccess:
RewriteCond %{REQUEST_FILENAME} !thumb

Any ideas?


Steven

snark


Ruud

#4
The function imageJPEG has 3 parameters (last 2 optional).
The second parameter is a file to save the image (leave empty to use standard output)
The 3rd parameter is the jpg quality (1 to 100).

imagejpeg $image '' 85 ) ;
should output the image in jpg quality 85.

Ruud

Edit: http://www.php.net/imagejpeg - The default quality is 75.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

snark

does anyone know how to set the jpg quality for this... I want the jpg quality to be better than the huge compression it now automatically does...



<?php


$path 
$_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];

$image imagecreatefromstring(file_get_contents($path));



$w imagesx($image);

$h imagesy($image);



// You can change the watermark filename below.

$watermark imagecreatefrompng('watermark.png');

$ww imagesx($watermark);

$wh imagesy($watermark);



imagecopy($image$watermark$w-$ww$h-$wh00$ww$wh);



header('Content-type: image/jpeg');

imagejpeg($image);

exit();

?>

snark

#2
for everyone who doesn't know ... the htaccess in the zipp needs a dot before the filename as soon as it iss on the server...

snark

#1
I found a terrific script that creates watermarked pics on the fly

what it does:

on opening an image it creates a new version of the image including the watermark

it does NOT edit the original and has the abillity to exclude files

for instance I told the htaccess file that files with relf in the filename do not have to get the watermark

in that way it works great with imageflow

how it is applied:

place the files in the attached zipfile in a dir in de media, alle the subfolders will react to the script

easy as can be

----

my question, it doesn't work with filenames that use spaces and that is something I like a lot in the imageflow

so I put in

Function Replace($image)
{

$pic = preg_replace('|[^a-zA-Z0-9_\-.]|', '-', $image);

return $pic;

}



but that does'nt do the trick

anyone?



note: you do not have to include any code into your files, just place the supplied files in de media dir


[gelöscht durch Administrator]