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
|
Inactive
Join Date: Jun 2003
Location: Surrey
Age: 58
Services: Virgin stuff
Posts: 6,407
|
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
|
Inactive
Join Date: Jun 2003
Services: Cablevision
Posts: 8,305
|
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
|
Inactive
Join Date: Oct 2003
Location: East Midlands
Age: 47
Services: Rural BB - Radio Link via Virgin Fibre
Posts: 2,947
|
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.
|
|
|
26-11-2004, 13:00
|
#5
|
Inactive
Join Date: Oct 2003
Location: East Midlands
Age: 47
Services: Rural BB - Radio Link via Virgin Fibre
Posts: 2,947
|
Re: Protect Images
Depending on what sort of usage and restriction you're planning for these images, watermarking might be worth looking into.
|
|
|
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
|
Inactive
Join Date: Mar 2004
Location: Brighton
Posts: 2,583
|
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
|
The Invisible Woman
Cable Forum Team
Join Date: Jun 2003
Location: between Portsmouth and Southampton.
Age: 72
Services: VM XL TV,50 MB VM BB,VM landline, Tivo
Posts: 40,341
|
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.
__________________
Hell is empty and all the devils are here. Shakespeare..
|
|
|
26-11-2004, 19:35
|
#9
|
Inactive
Join Date: Oct 2003
Location: 2nd CPU to the right & past the cache
Posts: 1,949
|
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.
|
|
|
26-11-2004, 20:15
|
#11
|
The Invisible Woman
Cable Forum Team
Join Date: Jun 2003
Location: between Portsmouth and Southampton.
Age: 72
Services: VM XL TV,50 MB VM BB,VM landline, Tivo
Posts: 40,341
|
Re: Protect Images
Quote:
Originally Posted by altis
|
Ah! I'd forgotten that one.
__________________
Hell is empty and all the devils are here. Shakespeare..
|
|
|
26-11-2004, 20:58
|
#12
|
Inactive
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 46
Posts: 6,343
|
Re: Protect Images
Yawn...
(this is a standard feature BTW)
|
|
|
26-11-2004, 21:47
|
#13
|
Inactive
Join Date: Jul 2003
Location: Southampton
Age: 41
Posts: 1,089
|
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
|
|
|
24-12-2004, 08:52
|
#14
|
Inactive
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
|
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.
|
|
|
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 18:45.
|