Solved

Hide data in picture ?

Posted on 2001-09-11
14
319 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now