1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Image protection

Discussion in 'Web Design & Development' started by roalex, Jan 23, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. roalex

    roalex Thread Starter

    Joined:
    Mar 21, 2004
    Messages:
    118
    Hi everybody!

    here is my question I am building my website in dreamweaver, but i have images in there that i do not want to be printed by people who visit my site what do i have to do to create such a protection?

    Thank you

    Roalx
     
  2. matt-h

    matt-h

    Joined:
    Apr 30, 2006
    Messages:
    333
    So you dont want images to be copied or printed? Well there is code to stop people right-clicking on images. With the printing, the only thing I can think of is a print css file but I dont think that will affect images.
     
  3. roalex

    roalex Thread Starter

    Joined:
    Mar 21, 2004
    Messages:
    118
    thank you can you tell me what the code would be to stop the right click?
    and avoid the copy or printin of the image.

    thank you again
     
  4. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    Tell CSS not to display the image if printed, that will work ;)

    In your CSS file put this:

    @media print {
    img { visibility: hidden; }
    }

    Then all images won't show up when printed.
     
  5. matt-h

    matt-h

    Joined:
    Apr 30, 2006
    Messages:
    333
    Put in the <body> section. Edit "var message="Function Disabled!" to whatever you want.

    Code:
    <script language=JavaScript>
    <!--
    
    //Disable right mouse click Script
    //By Maximus ([email protected]) w/ mods by DynamicDrive
    //For full source code, visit [url]http://www.dynamicdrive.com[/url]
    
    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>
    
     
  6. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    That's useless, there's always ways around no-right-click scripts ;)
     
  7. matt-h

    matt-h

    Joined:
    Apr 30, 2006
    Messages:
    333
    OK, come up with something better :p
     
  8. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    That's just the thing though, NOTHING can prevent saving images to your computer.
    There is always a way to get the image.
     
  9. Gibble

    Gibble

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    There is absolutely no possible way to eliminate a person from stealing your images. None. You can make it slightly more difficult, but it's impossible to stop.
     
  10. DoubleHelix

    DoubleHelix Banned

    Joined:
    Dec 9, 2004
    Messages:
    24,388
    Professionals put watermarks on their pictures so when someone saves or prints the picture, it's clear who the original creator is.
     
  11. idowindows

    idowindows

    Joined:
    Oct 10, 2006
    Messages:
    550
    Any image you want, you can just hit the Print Screen button on your keyboard, open MS Paint, Paste, from there, you can just cut and past the picture, save it and rename it...

    There is always a way...
     
  12. Gibble

    Gibble

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    That, and it's probably already in your temporary internet files cache directory.
     
  13. MMJ

    MMJ Guest

    Joined:
    Oct 15, 2006
    Messages:
    3,625
    If you are displaying an image on your website than the browser will download it to your computer, no matter what. Basically if you see the image then you have the image.

    I would go with the watermark solution.
     
  14. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/537685

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice