Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-25-2004, 08:39 AM   #1
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Web graphic copyrights

Hi all,

How to make graphics on a website so that no one can copy or save them.

Thanks
daisiee69 is offline   Reply With Quote
Old 11-25-2004, 11:26 AM   #2
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
It is impossible to do so. However, you can try to keep them from copying it and that is by using JavaScript to do an alert everytime someone right clicks on a page. One can easily go around that by going to the source code and going to the image directly - the JPEG extension and then copy and paste.

kram
__________________
"For today, goodbye. For tomorrow, good luck. And forever, Go Blue!"
University of Michigan President Mary Sue Coleman
kram 2.0 is offline   Reply With Quote
Old 11-25-2004, 02:01 PM   #3
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Thanks for the answer kram8806,

That's what I thought. I just read another post on this.

Daisie
daisiee69 is offline   Reply With Quote
Old 11-27-2004, 10:10 PM   #4
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
A new technique I found-- with tables or CSS or both, with layering, but a transparent 1x1 spacer (and stretched with HTML to the size of the "real" image) over the image you wish to prevent from being copied.
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 11-27-2004, 10:29 PM   #5
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
That's a pretty smart idea FF - didn't think of that. However, unless you use some databasing language that would physically restrict the access of the picture unless just shown on the webpage (much like Webshots is - you can't access the JPF file alone), it is impossible to prevent someone from taking the picture. That being said, what FF said would work for almost 99% of the time - the 1% being the person who goes into the source code, physically looks for the .jpg file, and accesses the picture file only. The chances of that happening are pretty small, though, given that google doesn't get to your site

kram
kram 2.0 is offline   Reply With Quote
Old 11-28-2004, 12:58 AM   #6
Member (10 bit)
 
Join Date: Dec 2003
Posts: 590
Send a message via ICQ to Vigo
Quote:
Originally Posted by kram8806
It is impossible to do so. However, you can try to keep them from copying it and that is by using JavaScript to do an alert everytime someone right clicks on a page. One can easily go around that by going to the source code and going to the image directly - the JPEG extension and then copy and paste.

kram
Never saw the js snippet; but I have found js codes where you can disable right clicking to prevent "save target as" and picture downloads.

http://www.1javastreet.com/vb/script...=2029&lngWId=2 - thats the first site I googled for. There are other variants but I don't think I've seen any other scripting language to do it in. Probably stuck with JS, but you can indeed disable picture saving from a browser (ie at least).
Vigo is offline   Reply With Quote
Old 11-28-2004, 01:02 AM   #7
Member (10 bit)
 
Join Date: Dec 2003
Posts: 590
Send a message via ICQ to Vigo
Quote:
Originally Posted by kram8806
the 1% being the person who goes into the source code, physically looks for the .jpg file, and accesses the picture file only.
You should be able to stop that from happening by disabling hot linking or remote linking. Then the actual file wouldn't be accesible from any other page. So they couldnt type in the full url of the picture to access the page and then download it. Some servers set this up automatically. I dont know what you need to do to do it manually... probably need to mettle with the htaccess file. Maybe someone else knows, or you can google an answer.
Vigo is offline   Reply With Quote
Old 11-28-2004, 01:30 AM   #8
Member (8 bit)
 
Join Date: Jun 2004
Posts: 220
Can't you take screen shot of your screen and cut out the picture in paint?
TennBikeBerk is offline   Reply With Quote
Old 11-28-2004, 01:42 AM   #9
Member (10 bit)
 
Join Date: Dec 2003
Posts: 590
Send a message via ICQ to Vigo
Yup. Theres unfortunately no way of getting around that. And all you need is MS-Paint to do it. However, youd have have to crop, and edit the image to get the image as it is. So atleast its not as easy as right clicking and clicking "save target as". Still not the best deterrant around.

Thats why most sites that host images include the website logo or image into the image: the best way is to include a semi-transparent image or url over the image itself, so it can't be edited out.
Vigo is offline   Reply With Quote
Old 11-28-2004, 12:17 PM   #10
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
Quote:
Originally Posted by TennBikeBerk
Can't you take screen shot of your screen and cut out the picture in paint?
You can Print Screen the page but certainly, the quality of the print won't be as good as the picture itself...but it is possible. As for disabling save target as, there's still a way around it. Physically going to View >> View Source Code would allow the person to search for that file path (whatever.jpg or gif) and access it along...databasing is necessary to restrict that.

kram
kram 2.0 is offline   Reply With Quote
Old 11-28-2004, 01:27 PM   #11
Staff
Premium Member
 
rjfvillarosa's Avatar
 
Join Date: Sep 2004
Location: Cardiff, Wales. UK
Posts: 6,105
I have a Java Script that will disable the right mouse click, it is not going to stop people downloading the pictures but it might deter some of the not so HTML savvy ones.
If they right click on the page it just says "I am sorry but the images on this web site are copyright protected" and it doesn't give them the drop down menu.
__________________
Niwa no niwa ni wa, niwa no niwatori wa niwaka ni wani o tabeta.

Last edited by rjfvillarosa; 11-28-2004 at 01:33 PM.
rjfvillarosa is offline   Reply With Quote
Old 11-28-2004, 01:37 PM   #12
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
Quote:
Originally Posted by rjfvillarosa
I have a Java Script that will disable the right mouse click, it is not going to stop people downloading the pictures but it might deter some of the not so HTML savvy ones.
If they right click on the page it just says "I am sorry but the images on this web site are copyright protected" and it doesn't give them the drop down menu.
Yep - that is certainly possible to prevent most people from getting the image. Certainly, those who don't know about the Source Code won't be able to access the image - or if they don't know Prt Scrn. Similar to my previous suggestion, this may be the best hassle-free method to copyright prevention.

kram
kram 2.0 is offline   Reply With Quote
Old 11-28-2004, 01:42 PM   #13
Staff
Premium Member
 
rjfvillarosa's Avatar
 
Join Date: Sep 2004
Location: Cardiff, Wales. UK
Posts: 6,105
Kram.... as has been said already you are never going to stop the more savvy ones, but with a bit of luck you might be able to deter the casual theft.

I did try to post the code but I would have had to change too much of it to get it to display. If any body wants it pm me and I will send it to you.
rjfvillarosa is offline   Reply With Quote
Old 11-28-2004, 01:52 PM   #14
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
Straight out of Dynamic Drive:
PHP Code:
<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&&!document.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> 
Is this the one you were thinking of rjfvillarosa? If so, here it is...also in post #6 as has been posted and mentioned by Vigo.

kram

Last edited by kram 2.0; 11-28-2004 at 01:55 PM.
kram 2.0 is offline   Reply With Quote
Old 11-28-2004, 01:54 PM   #15
Staff
Premium Member
 
rjfvillarosa's Avatar
 
Join Date: Sep 2004
Location: Cardiff, Wales. UK
Posts: 6,105
No Kram the one I have I wrote myself a few years ago, but looking at that one there is not a lot of difference, EXCEPT.... mine has my name in it....
rjfvillarosa is offline   Reply With Quote
Old 11-28-2004, 01:57 PM   #16
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
Quote:
Originally Posted by rjfvillarosa
No Kram the one I have I wrote myself a few years ago, but looking at that one there is not a lot of difference, EXCEPT.... mine has my name in it....
All the same...the one from DD, yours, or the one that Vigo has up there works. As long as it works, it's all good - I actually had a JavaScript that has a non-terminating for loop around the alert function...yes, I have crashed MSIE browsers for fun before - don't ya like messing around with code sometimes

kram
kram 2.0 is offline   Reply With Quote
Old 11-28-2004, 02:10 PM   #17
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
You can give up trying to protect images. It is fruitless. All of the above listed things can be bypassed in a few seconds. Best to keep them small or have a copyright watermark that can't be edited out easily. This is certainly not practical for images that are part of the page design. You can put a no right click that is only a warning. I do like the one that when you right-click tells you that you are going to reformat your hard drive. Kind of funny.
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Old 11-28-2004, 07:21 PM   #18
Staff
Premium Member
 
rjfvillarosa's Avatar
 
Join Date: Sep 2004
Location: Cardiff, Wales. UK
Posts: 6,105
This is the one I wrote a few years ago, it's a bit old now and by the way it doesn't work in Firefox. I suppose I could change it but it doesn't seem worth the effort.

PHP Code:
<SCRIPT LANGUAGE="JavaScript1.1">
<!-- 
Original:  Richard Finch (richard@taillinks.com) --> 
<!-- 
Begin
function right(e) {
if (
navigator.appName == 'Netscape' &&
(
e.which == || e.which == 2))
return 
false;
else if (
navigator.appName == 'Microsoft Internet Explorer' &&
(
event.button == || event.button == 3)) {
alert("I'm sorry, but the images on this page are copyright protected and are not for sharing.");
return 
false;
}
return 
true;

  
document.onmousedown=right;
document.onmouseup=right;
if (
document.layerswindow.captureEvents(Event.MOUSEDOWN);
if (
document.layerswindow.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
//  End -->
</script> 

Last edited by rjfvillarosa; 11-28-2004 at 07:24 PM.
rjfvillarosa is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:12 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2