• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 335
  • Last Modified:

Hide data in picture ?

How do I hide a string of data inside the picture ?

Can I have a sample code ?
0
johnmemor
Asked:
johnmemor
  • 4
  • 3
  • 2
  • +4
1 Solution
 
Anthony PerkinsCommented:
Please take care of your open questions.  You have questions pending from May.

Questions Asked 29
Last 10 Grades Given A A A A A A A A A A  
Question Grading Record 23 Answers Graded / 23 Answers Received
0
 
rspahitzCommented:
You can hide data inside a picture by replacing certain pixels with the ASCII code of the corresponding data.  Is that what you mean?
0
 
johnmemorAuthor Commented:
yes. But I have to know where/what byte I replaced it.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rspahitzCommented:
Well, you can always store it in a corner:

1) Place the desired picture into a picturebox control
2) Determine the first byte to store in the picture (bytecode=chr$(bytevalue))
3) Put it into the first picture pixel location (Picture1.PSet (0,0), bytecode)
4) Repeat for each bytevalue, noting that the PSet uses a grid-style organization, so you may need to use a nested loop.

Note: To get the value out of a location, use Picture1.Point(x,y)
0
 
wileecoyCommented:
Don't want to write a book or anything, though - looks funny.
0
 
JanusFuryCommented:
you can try using a grid and encoding the value in the 4 lowest bits of each RGB component, so the pixel will only look somewhat odd instead of looking completely wrong.

i.e.
original red is 10100011, original green is 11000101
value being encoded is 11100111
new red is 11100011, new green is 01110101

this would minimize the visiblity of the data while allowing you to still encode it.
i believe digimarc uses something along these lines.
0
 
IBRownCommented:
I did this a while ago.

I found that if I just used the lowest bit of the blue value then I was able to hide documents inside images with NO visible clues or changes to the image.

The limitation of this method is that you can only store 1 bye of info for every 8 pixels in the image. You could try to change this by using the lower bit of each of the RGB channels. I chose to use just the blue channel as the eye is less receptive to change in blue than in red or green.

If you want to hide the document a little better, then don't just hide it starting from the top left pixel and go to the bottom right. Someone who suspected a document was hidden within an image would be able to find that. you could for example work from the top and bottom (get even bits from the top row, odd bits from the bottom) and work towards the middle.

JanusFry is on the right lines, but my approach removes visible clues that there is 'something in there' about the image.

My code is on a different machine - unless it's been deleted.
0
 
JanusFuryCommented:
Yeah, i'm sure either of us could write something to do that for you. I recommend letting john do it though ^_^ He's probably much more experienced in the area.
0
 
johnmemorAuthor Commented:
JanusFury, who is John ?
0
 
JanusFuryCommented:
john as in johnmemor... :P
0
 
JanusFuryCommented:
oops crap, hehe, i see :P I must have gotten the names mixed up, my apologies. I meant IBrown. ^_^ A tad dyslexic, forgive me :)
0
 
IBRownCommented:
You'll have to give me a couple of weeks....I'm rather busy at the moment!


IBrown.
0
 
johnmemorAuthor Commented:
IBrown,

OK !
0
 
ArkCommented:
Hi
This techique is known as "steganography". Take a look on sample at http://www.vb-helper.com/HowTo/steganography.zip

Cheers
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 3
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now