Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   Internet Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=25)
-   -   Protect Images (https://www.cableforum.uk/board/showthread.php?t=20645)

Colin 26-11-2004 12:45

Protect Images
 
Hi there, does anyone know how to protect images on the internet so you can't right click on them and save.

Cheers

Colin

Nemesis 26-11-2004 12:47

Re: Protect Images
 
Add this to the body of your page
Quote:

<script language=JavaScript>
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!docume nt.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>

SMHarman 26-11-2004 12:48

Re: Protect Images
 
Javascript to change the rightclick of the mouse.
PHP Code:

  <script language=javascript>var clickmessage='Copyright 2003 News Group Newspapers Ltd and/or its licensors. No use without permission. Contact [email]enquiries@nisyndication.com[/email]'
    
function disableclick(e) {
        if (
document.all) {
        if (
event.button==2||event.button==3) {
        if (
event.srcElement.tagName=='IMG'){
        
alert(clickmessage);
        return 
false;
        }
        }
    } else if (
document.layers) {
        if (
e.which == 3) {
        
alert(clickmessage);
        return 
false;
        }
    } else if (
document.getElementById) {
        if (
e.which==3&&e.target.tagName=='IMG'){
        
alert(clickmessage)
        return 
false;
        }
        }
    }
    function 
associateimages() {
        for(
i=0i<document.images.length;i++) {
            
document.images[i].onmousedown=disableclick;
        }
    }
    if (
document.all) {
        
document.onmousedown=disableclick
    
} else if (document.getElementById) {
        
document.onmouseup=disableclick
    
} else if (document.layers) {
        
associateimages()
    }
</
script

Is the one associated newspapers use to do it.

But in any case it's a bit of a waste of time as the images are cached on the users PC and anyone with some nouse, or the right firefox addin can capture them all anyway.

Jon M 26-11-2004 12:58

Re: Protect Images
 
The simple fact is, that if your browser can display it, it can be saved.
As SMHarman says, Firefox has an extension that disables right-click protection and even IE users only need to extract the images from their browser cache.

Jon M 26-11-2004 13:00

Re: Protect Images
 
Depending on what sort of usage and restriction you're planning for these images, watermarking might be worth looking into.

Colin 26-11-2004 13:05

Re: Protect Images
 
Hi guys, thanks a lot. I know nothing can be completly protected, but then again, the majority of internet users will also not know or be arsed to do it
Thanks Again

cookie_365 26-11-2004 18:31

Re: Protect Images
 
If you use untitled bmps I think it stops people dragging & dropping the images in XP too - not 100% sure though; I've seen it on some sites but don't know how its done

Maggy 26-11-2004 19:11

Re: Protect Images
 
Quote:

Originally Posted by s1lv3r
Depending on what sort of usage and restriction you're planning for these images, watermarking might be worth looking into.

That will cost though.However some folk do come up with some pretty ingenious ways of preventing copying.Like one site where when you save the image all you would save is a transparent layer.Don't know how they did it but I was intrigued.

Incog. :)

MetaWraith 26-11-2004 19:35

Re: Protect Images
 
Quote:

Originally Posted by Incognitas
That will cost though.However some folk do come up with some pretty ingenious ways of preventing copying.Like one site where when you save the image all you would save is a transparent layer.Don't know how they did it but I was intrigued.

Incog. :)

Pretty easy really. Thinking off the top of my head here, with the first of the weekend's alcohol intake inhand. One method would be to have the image as the background in a single celled table. Table data would then be a transparent gif covering the whole cell. Rightclicking would then result in saving the transparent gif rather than the real image. Give the transparent gif a deceptive name just to lull the unsuspecting copier.

As others have said it's already displayed on your browser, so you MUST be able to get at it somehow. What mankind can devise as protection, mankind can overcome.

altis 26-11-2004 20:07

Re: Protect Images
 
Many methods were discussed in this thread started by Incognitas:

http://www.cableforum.co.uk/board/sh...ad.php?t=11467

Maggy 26-11-2004 20:15

Re: Protect Images
 
Quote:

Originally Posted by altis
Many methods were discussed in this thread started by Incognitas:

http://www.cableforum.co.uk/board/sh...ad.php?t=11467


Ah! I'd forgotten that one. :)

Richard M 26-11-2004 20:58

Re: Protect Images
 
1 Attachment(s)
Yawn...

(this is a standard feature BTW)

keithwalton 26-11-2004 21:47

Re: Protect Images
 
I was going to make the comment that firefox now has the javascript properties feature built in but Rich beat me to it :)
Pioneer seem to use a clever protection thing on some images, as in on this page http://www.pioneer-eur.com/eur/body.jsp The image top left just saves as pixel.gif
As others have said though images are easily copied, even if you cant save them you cant still hit print screen and dump the contents in the clipboard.
Perhaps a watermarking system maybe of more use

ikthius 24-12-2004 08:52

Re: Protect Images
 
why don't you just make your img src like this:

<img src="image.jpg" onContextMenu="return false">

I think you will have to have javascript enabled.

ik

EDIT: Give it a try, your right click function is disabled, and does not work.


All times are GMT +1. The time now is 16:24.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum