Forum Moderators: coopster

Message Too Old, No Replies

Trying to add watermark on the fly to my images.

         

javier

6:33 pm on Apr 2, 2008 (gmt 0)

10+ Year Member



Hello people!

I'm trying to install a watermarking script I found and I'm having some trouble. The script is invoked via Mod_Rewrite.

From this page, here's the author's explanation of how to use Mod_Rewrite for this:


Lets say my URL is something like this:

http://www.example.com/users/johndoe/index.html

Basically, the rule is pretty straight forward:

RewriteEngine on
RewriteBase /johndoe
RewriteRule ^(watermarked.*)/(.*\.[jJ].*)$ /~liem/wm.php?p=$1&i=$2

I'm using the RewriteBase directive here because all of my documents and images are based out of the /johndoe/ directory.

Because I won't want all of the images on my site watermarked, I only put the images I want to be watermarked in the "watermarked" subdirectory. The path and filename information are passed to the wm.php script so that they're properly handled.

I already get this to work, now my question is:

Exist any way to define the watermark logo position on the images?

I wanted to show the watermark logo at top/right for all the images, no matter the image size.

Any clue? excuse my poor english, thanks in advance.
Best regards.
Javier

[edited by: eelixduppy at 9:32 pm (utc) on April 2, 2008]
[edit reason] removed URLs [/edit]

mikhaill

10:26 pm on Apr 2, 2008 (gmt 0)

10+ Year Member



The mod_rewrite only passes the information to the script that generates the watermark for the images. Your editing would have to take place in wm.php to specify where you want the watermark to appear.