26-11-2004, 12:45
|
#1
|
|
Guest
|
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
|
|
|
|
26-11-2004, 12:47
|
#2
|
|
cf.mega poster
Join Date: Jun 2003
Location: Horsell
Age: 41
Services: Digital TV, 2Meg Broadband and Phone
Posts: 6,611
|
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>
|
|
|
|
26-11-2004, 12:48
|
#3
|
|
Legal Alien
Join Date: Jun 2003
Services: Cablevision
Posts: 8,130
|
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=0; i<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.
|
|
|
26-11-2004, 12:58
|
#4
|
|
is lurking
Join Date: Oct 2003
Location: Bracknell
Age: 30
Services: Freeview, NTL phone, NTL 4mbit BB SACM
Posts: 3,281
|
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.
__________________
Forum Etiquette | Anti-Spam
'slightly pious, very sanctimonious and far too serious'
information is not a property of matter, it's applied to matter by intelligence
|
|
|
26-11-2004, 13:00
|
#5
|
|
is lurking
Join Date: Oct 2003
Location: Bracknell
Age: 30
Services: Freeview, NTL phone, NTL 4mbit BB SACM
Posts: 3,281
|
Re: Protect Images
Depending on what sort of usage and restriction you're planning for these images, watermarking might be worth looking into.
__________________
Forum Etiquette | Anti-Spam
'slightly pious, very sanctimonious and far too serious'
information is not a property of matter, it's applied to matter by intelligence
|
|
|
26-11-2004, 13:05
|
#6
|
|
Guest
|
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
|
|
|
|
26-11-2004, 18:31
|
#7
|
|
Double-Choc
Join Date: Mar 2004
Location: Brighton
Posts: 1,941
|
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
|
|
|
26-11-2004, 19:11
|
#8
|
Join Date: Jun 2003
Location: between Portsmouth and Southampton.
Age: 55
Services: VM DTV,VM 2MB,VM Phone
Posts: 18,973
|
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.
__________________
Prejudice is opinion without judgement...Voltaire.
Is still Incognitas at heart.
If it's bold it is a moderation technique.If it's soft it's Coggy speaking.
|
|
|
26-11-2004, 19:35
|
#9
|
|
Ghost Process Killer
Join Date: Oct 2003
Location: 2nd CPU to the right & past the cache
Posts: 1,861
|
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.
__________________
Yesterday it worked. Today it is not working. VM is like that.
Three things are certain: Death, taxes and lost data. Guess which has occurred ?
|
|
|
26-11-2004, 20:15
|
#11
|
Join Date: Jun 2003
Location: between Portsmouth and Southampton.
Age: 55
Services: VM DTV,VM 2MB,VM Phone
Posts: 18,973
|
Re: Protect Images
Quote:
|
Originally Posted by altis
|
Ah! I'd forgotten that one.
__________________
Prejudice is opinion without judgement...Voltaire.
Is still Incognitas at heart.
If it's bold it is a moderation technique.If it's soft it's Coggy speaking.
|
|
|
26-11-2004, 20:58
|
#12
|
|
cf.mega poster
Join Date: Jun 2003
Age: 29
Posts: 6,273
|
Re: Protect Images
Yawn...
(this is a standard feature BTW)
|
|
|
26-11-2004, 21:47
|
#13
|
|
cf.mega poster
Join Date: Jul 2003
Location: Southampton
Age: 24
Posts: 1,075
|
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
__________________
Killer of threads
|
|
|
24-12-2004, 08:52
|
#14
|
|
while(!naked){--clothes}
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,012
|
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.
__________________
Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 19:43.
|