Solved

Hide data in picture ?

Posted on 2001-09-11
14
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 
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 28

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

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!

Question has a verified solution.

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

Suggested Solutions

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 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