Solved

Hide data in picture ?

Posted on 2001-09-11
14
324 Views
Last Modified: 2010-08-05
How do I hide a string of data inside the picture ?

Can I have a sample code ?
0
Comment
Question by:johnmemor
  • 4
  • 3
  • 2
  • +4
14 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6474964
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
 
LVL 22

Expert Comment

by:rspahitz
ID: 6475305
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
 

Author Comment

by:johnmemor
ID: 6476523
yes. But I have to know where/what byte I replaced it.
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 22

Expert Comment

by:rspahitz
ID: 6477089
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
 
LVL 4

Expert Comment

by:wileecoy
ID: 6477164
Don't want to write a book or anything, though - looks funny.
0
 
LVL 2

Expert Comment

by:JanusFury
ID: 6478193
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
 

Expert Comment

by:IBRown
ID: 6479910
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
 
LVL 2

Expert Comment

by:JanusFury
ID: 6480687
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
 

Author Comment

by:johnmemor
ID: 6487568
JanusFury, who is John ?
0
 
LVL 2

Expert Comment

by:JanusFury
ID: 6491724
john as in johnmemor... :P
0
 
LVL 2

Expert Comment

by:JanusFury
ID: 6491726
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
 

Expert Comment

by:IBRown
ID: 6492696
You'll have to give me a couple of weeks....I'm rather busy at the moment!


IBrown.
0
 

Author Comment

by:johnmemor
ID: 6497407
IBrown,

OK !
0
 
LVL 27

Accepted Solution

by:
Ark earned 125 total points
ID: 6533673
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question