Darin Swan, Inc.



Home
Entertainment
Jigsaw Puzzles
Games
Jokes / Humor
Artwork
Web Components
Bulletin Boards
Password Protection
Site Search
Products
Image Protection
Documentation
Windows 98 Install
Resume
Contact Us
About Us

Image Protect Applet for the Web

Have you even placed an image on the web only to find it on someone else's web page? It can be very frustrating that it's so easy for someone to take your images. To the average user there seems to be no way to protect yourself from having your web page images stolen. There are however several ways to protect your images from theft except for a very select few web experts.

The most common and easiest way that images are taken from a web site is just to right click on them and select "save image as". Try it out, you can even set it as your background.


"Javascript to The Rescue" ("maybe")

The first solution to this is to add some javascript to your web page that will actually catch the right click event when someone tries to right click on an image and says something like "please don't steal my images, ask and you may receive.".

This will stop most of your average web travelers. It is however a bit of code and can be a little intimidating to begining web designers as it is javascript and requires a few changes each time you change images.

The advantages are that it's fairly easy to implement, and it stops a good deal of people from taking your images. The disadvantages are that you have to modify the javascript all the time, and that it's not really all that hard for a net savy person to get your images. The source code for javascript is readily available to anyone who can read it just by selecting "view source" in the browser menu. They can find the name of the image, and the "Path" and there's nothing you can do short of making the code as unreadable as possible, which also makes it hard for you to read. Then they just type in your web site address followed by the path and image name, and the browser will bring it right up. No javascript protecting it or anything. They right click and they have it. Also you couldn't protect it from a spider program designed to get all web pages or images from a site. Since you still have HTML code to display the image the spider will find it.

I ran into this on eBay actually. Some people I knew had tried to get an animated Xmas image for their page and found it protected with this javascript. They couldn't get past it adn asked me to. Now because I was a web developer I knew how it all worked and had it in about a minute or less. It also disturbed me enough that I set out to figure out how to really protect an image. Or at least to protect it better.

One of the biggest problems is that no matter what I do with javascript the source is still there for anyone to view. If I wrote something in perl or asp (web server programming languages) and output and image the browser still sees it as an image and lets you right click on it. No it had to be something that could hide the path to the image and still protect it when the user is browsing it. So javascript was definately not the answer.


Advantages:

1. You can't right click on an image to save it.
2. You can protect you images if you know how to add some javascript to your page.
3. You will stop your average web user.
4. You can put in a little pop up window message when they try to right click.


Disadvantages:

1. Anyone can view the code with a "view source" and figure out the image path.
2. It could be difficult to add to your web page or at least messy.
3. Most web designers know HTML and some Javascript (larger group than can read the code).
4. There are at least 3 other ways to get them (not disclosed here)
5. A web spider can get all the images regardless of this type of protection.

A Better Solution:

I had written a fancy program years ago using java be a map of a country with irregular areas that could be clicked on. An unexpected side effect was however that the map couldn't be saved by right clicking on it. Since it was a java program (applet) the browser treated it different than an image. So I decided I'd write a java applet that could be compiled so that no one could see the original source code. Then I'd use a hidden path that was stored inside the code that nobody could see, and have the applet load the image itself. It worked. If you "view source" there is just a little bit of code referring to an applet and the image name ("but not the full path").

Advantages:

1. Easy to place on any web page.
2. you can specify the image name simply and easily.
3. You can't determine the image path by doing a "view source". (it could be anywhere!)
4. You can't right click on it to save it.
5. Web spiders can see the images.
6. It's compiled Java so theres no source to see or view.


How to Get the Image!

There are still ways to get the images. I didn't post this before, because I didn't want to help out the would be image thief, but as you would likely find it out with a little reseach anyway, and it's easier to protect you images if you know how they will likely be taken, I decided to write out a few ways to get the images.

One of them requires a knowledgable programmer or hacker. He would decompile the applet. Read the code and figure out exactly what I'm doing, and retrieve the image.


The next is easy, you can get a program that takes snapshots of the screen. Then capture what is displayed and save it as an image. You may have to do a little editing but you will have it. There are only a few ways to prevent this. See Below.

A person could guess the correct path. Very unlikely, they are not pretty and not at all common.

The person could search their hard drive for the image, and possible find it in their cache. It requires them to know the name of the file, and actually locate the image. Assuming they realize its on their system at all and can locate it. I never bothered myself, the snapshot is much faster and easier.

The person could attempt to use a program that will fetch an entire website, but as such a program would have to follow links to find the files, as long as you don't directly link to the images they won't get them.

Now Considering these options, your average person will not likely get the image. A highly skilled programmer or hacker will have it in no time though using one of the above methods, or something similar.

The applet merely makes it much more difficult to get the image. Like putting on heavy duty locks on your house. A safe cracker can still get in, as can an experienced thief, but it's much harder for the average person.


How else can I protect my images!
Well starting with the applet program is a good start. The next would be to add a watermark. Meaning some faint text over the main part of the image. Usually the name of the artist or company. This means they would have to clean it up to use it, and it's usually not worth it. But of course the image would still look fine to the viewer.

The best way of course is to use smaller or lower resolution images, especially if you intend to sell the images.
So you would give them the low resolution and small ones, but they have to pay for the high resolution larger images. Which of course you don't put on the website, or you at least put in a password protected directory.


Note: The swan image at the top of this page is using the java applet. The w3c logo below however is not. Right click on each to see the difference.


At this time I do not have my store up so if you are interested in purchasing the applet please send me an email at darin_swan@yahoo.com


If you know Java feel free to write your own using the information I have described in this document.