Making .NET program that hides an image inside an image
-
13-09-2020 - |
Question
I want to start a little pet project that will allow a user to pic an image and then hide that image within another image. Meaning that if you open the dummy-image that's all you'll see. But if you open the dummy-image with my software you'll see the actual image.
I've never done something like this so I'm pretty excited about getting away from the typical CRUD applications.
- What is this called? (I'm sure it exists, right?)
- Where can I find some nice theory behind it so I can make it robust.
Thanks so much for helping me yet again! :)
Edit:
So just to be clear on what my first step should be, I need to grab an image and convert it to a matrix of int[n,n] and process each cell individually finding the least binary value?
Solution
- It is called steganography.
- The Wikipedia page I linked to above includes lots of information about various techniques. You should be aware though that this is a form of "security by obscurity". If by "robust" you mean unbreakable then you are out of luck. It is not a substitute for proper encryption.
OTHER TIPS
You want to create some sort of Steganography application. By applying the technique described in this blog post, it won't be hard at all:
- Prepare or create an image (let's call it visible.jpg)
- Prepare or create your would-be hidden image (hidden.jpg)
- Create an application which will create a password protected rar from hidden.jpg, using Process.start().
- Use Process.start again to issue the command
copy /b visible.jpg + hidden.rar visible.jpg
Your hidden.jpg now resides inside visible.jpg
To get your hidden.jpg back, rename visible.jpg
to visible.rar
and extract the hidden image.
Edit:
According to a lifehacker article, a gif image and / or a zip file will do as well.