You are on page 1of 6

Hidden Text inside an Image

Odds & Ends


Preamble
• This code is an example of Steganography
using images from my discussion video on the
topic. If you are struggling to understand
what’s going on I suggest watching it.
• If you have never worked with python code
before this may be hard to follow along
What is it?
• A python program that hides information in
png pictures
• Allows for hiding and retrieving of text inside a
.PNG picture
How it works
• Opens and image and looks at the pixels in
hexadecimal.
• If the pixels blue channel falls in the 0-5 range then 1
bit of information is stored
• Ends the stream with a delimiter of fifteen 1’s and a 0.
to take up two bytes.
• When time times to retrieve it pulls all the blue bits of
0 and 1 until the stream obtains the delimiter of fifteen
1’s and a 0.
Creating our program
• We will create a program called hide.py
• We will use several function for manipulting our
data (rgb2hex, hex2rgb, str2bin, bin2str)
• We will have four operation functions (encode,
decode, hide and retr)
• Our main will handle arguments and whether to
store or retrieve.
Complete
• I hope you enjoyed this program and learnt
something new!

• Feel Free to leave questions in the comments


I’ll try to answer all of them.

You might also like