views:

81

answers:

2

I need a way my image sources to be hard to read.

Currently I have

<img id="testImg" src="http://images.mydomain.com/sample.png />

and I need it converted to something like:

<img id="testImg" src="javascript:xorDecode('3233435jh45h3232kl232kl2323', '32434mfr')"/>

Is this possible?

P.S. And I want to to so for around 200 KB various images.

+1  A: 

If your xorDecode function returns a valid URI, this will work. However, anyone with firebug will be able to see the decoded URI.

You can use the data URI scheme in new browsers, this will require you to encode the image as text and embed it in the page/css.

Oded
As far as I am aware the URI has a limited length and I wish to encode around 200 KB images.
Gad D Lord
+1  A: 

There is a plugin, in The Gimp, to export an image as a series of HTML <td>'s, one for each pixel. It is the best way to utterly obfuscate an image.

amphetamachine
And a single printscreen solves the problem for the user, doesn't it?
Vitor Py
+1 because it's interesting and I've never heard of it... BUT this process will be easily reversible (why not print screen!), it will increase the image size hugely (no optimisations! Essentially a BMP with a large overhead). Important to note, ANYTHING you put online CAN be copied and stolen. It is also important to note that a lot of people value their pictures a lot more than they are actually worth.
Tom Gullen
I doubt that 200 KB images will ok with all those additional <td> tags. I guess the whole size will be increased to 1 MB of markup.
Gad D Lord