0

I have several of my own photos that I need to add a simple watermark to; however, I would like to add stegonography to the watermarked layer in order to put the image information, the page that the image was to be placed on, etc... hidden within the watermarked layer. Is there a way that I can use php to view the stegonography data from the watermarked layer of the completed photo? If so, how?

4
Contributors
18
Replies
19
Views
7 Years
Discussion Span
Last Post by diafol
0

I know how to actually embed and then read the steganography; however, what I want to do is a little more than that. Instead of putting the steg directly into the image directly, I want to make a transparent watermark layer and have the steg hidden within the watermark. That means that since the watermark is now transparent, people wouldn't want to mess with it if they can't see that it's there. That then means that the steg info is now pretty much constant with the image. The big question is HOW to get to the steg info from that watermarked layer once the entire image is created with the watermark and steg added. Any ideas?

-3

There are more than one way coz i am graphic designed and i searched too much about the same thing to protect my stuff..so i will post the ways i fought(i dont know there are other ways or no):

•)First Way: make ur image the background of Div...and put into this div transparent image (dot 1px x 1px) and make itrepeat X and Y..so when some one press right click on the image and save the image he will save transparent dot not ur image

••)Second way: disable the right click!! and there are some small codes for that

First Code: Disable right click and display error

<script language=JavaScript> <!---
var message="Sorry, that function is disabled."; // Message for the alert box

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> </script>

Second Code: Disable right click Without displaying error:

<script language="JavaScript">
<!-- Disable
function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")
document.oncontextmenu=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
//-->
</script>

••)Third Way: Disable Selection so he cant drag and select it and press Ctrl + C

<script language="JavaScript1.2">

function disabletext(e){
return false
}

function reEnable(){
return true
}

//if the browser is IE4+
document.onselectstart=new Function ("return false")

//if the browser is NS6
if (window.sidebar){
document.onmousedown=disabletext
document.onclick=reEnable
}
</script>
Votes + Comments
Neither option is secure, as the user can just view page source and browse directly to image URL.
0

OK, I'm assuming that you're talking about creating a png file right? With a watermark layer containing steg info. You can combine layers dynamically with the GD library. The link I quoted should allow the info to be written and read via php Am I missing the point here?

0

Thank you for your message DarkBerzerk, although it didn't make that much sense.

if u that much good and give us bad rates...what about say better idea?
when some one ask for some thing and some other say idea and just say this idea is bad...say ur idea..

I don't claim to have a response to wrstrong's question. I am here to learn, just like everyone else. The reason I marked your response down however, and I call it a response, not an answer is because it in no way answers the original question whatsoever and furthermore because what you suggest will not protect an image. If its displayed in the user's browser, it has already been downloaded onto their machine. That is simply the nature of the WWW.

R.

0

The third party links on the above site are worth a look. The class I offered is also worth investigating.

I will distance myself from the "good-natured banter" and wish you good luck.

0

I've already seen that link, robothy. I've already logged tons of hours trying to research how to do this and have yet to come up with a viable solution. That's why I'm contacting forums such as this one.

For what I need to do, I can either go about doing this one or two ways.

Possibility one:
1) Create watermark image (which I can do now)
2) Insert STEG info into the watermark image (which I can do now)
3) Layer watermark image onto my image (which I can do now)
4) See the STEG info that's in the watermarked layer of my image (here's where I need help)

Possibility two:
1) Instead of using STEG, putting custom fields into the EXIF of the image
2) Lock down the custom fields and their info in the EXIF
3) See the EXIF info in the image (irregardless if there's a watermark or not)
(Which I can't do any of these, yet. :)

I need to do either of these using php so that I can make it happen on the fly.

Thanks for all the help, guys!

0

Here's an extract from the class I referred to:

This class can be used to encrypt data (messages, files) and hide that data in images using steganography techniques. Steganography is the art and science of writing hidden messages in such a way that no one apart from the intended recipient knows of the existence of the message; this is in contrast to cryptography, where the existence of the message itself is not disguised, but the content is obscured.

It reads a given image in GIF, JPEG or PNG formats, encrypts data supplied by the user (a message, a file, a collection of both) and hides the encrypted data in the image by making subtle colour changes to certain pixels to store the data in the image symbolically. The resulting image is generated in PNG format (because PNG is lossless).

It can also perform the reverse operation by extracting the original data previously stored in an image using this package.

Ain't that what you're looking for??

Edited by diafol: n/a

0

My way of proceeding would be:

1. Add watermark to image via GD library.
2. Add sten to new image.

I don't know whether you could add sten to the watermark image and then combine it with the 'real image' and still read back the sten.

0

If I add the steg into the image itself (without putting it on a layer,) it is eliminated when simply cropping the image, renaming, etc... However, when you add a watermark, as long as it's small enough to be repeated throughout the image, you could crop that thing all day long and it would still be there.

0

Ok, carry on then. Simple enough - treat the watermark as the image - do the steg, then merge the watermark image with the actual picture.

0

I can do up to that part; however, how would I read the steg from within the watermark from within the picture? That's what my issue is.

0

Ah, I see. Have you tried it? Combine the watermark (containing the steg) with the image via GD library?

I tried the class I mentioned at the head of this thread, and indeed, when you crop the image, the steg is lost. If a transparent layer containing the steg is made to say a tile, which is then repeated into a graphic and then placed on the image, perhaps that would work?

0

I have not been able to get to the steg in the watermark layer because in order to do that, I'd have to separate the watermark from the image first, and I can't figure out how to do that. Any ideas?

0

Yeah do the watermark with steg then use GD library to overlay the images. See boutell.com or the php manual for GD functions.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.