-
Server side water marking
Im starting up a site that will allow clients to publish comics. Everything is is server side, even the image hosting. They can link into the image (and of course save it), but i am looking for a server side watermarking script that can be run in real time after the image is writen. Id like to stay in the pure dhtml range. Im not worried about people stealing the image, because there is not theft online (l33tness comment). I just want the watermark there for cold linkage purposes so i get more hits. Ideas or scripts please>?
-
<script language="JavaScript1.2">
<!--
width = 184; // width in pixels
height = 49; // height in pixels
rightx = 50; // move to the right x percent
downy = 100; // move down x percent
wm_reload = 100; // milliseconds to reload the position of the watermark
if (!document.all) document.all = document;
if (!document.all.watermark.style) document.all.watermark.style = document.all.watermark;
wm = document.all.watermark.style;
wm.width = width;
wm.height = height;
navDOM = window.innerHeight; // navigator handles it a little differently
function setvalues() {
barwidth = 0; // compensate for the scrollbar on PC width
barheight = 0; // height
if (navDOM) {
if (document.height > innerHeight) barwidth = 20;
if (document.width > innerWidth) barheight = 20;
} else {
innerWidth = document.body.clientWidth;
innerHeight = document.body.clientHeight;
}
posX = ((innerWidth - width)-barwidth) * (rightx/100);
posY = ((innerHeight - height)-barheight) * (downy/100);
}
function refresh_wm() {
wm.left = posX + (navDOM?pageXOffset:document.body.scrollLeft);
wm.top = posY + (navDOM?pageYOffset:document.body.scrollTop);
}
function resize_wm() {
setvalues();
window.onresize=setvalues;
markID = setInterval ("refresh_wm()",wm_reload);
}
window.onload=resize_wm; // protection for Mac IE4.5
//-->
</script>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks