This document summarizes a Python program that hides text inside PNG image files using steganography. The program works by encoding the text as binary and hiding the bits in the blue channel of image pixels. If the blue value is between 0-5, it represents a 1 bit, and values above represent a 0 bit. A delimiter of 15 1's and a 0 is used to mark the end of the hidden text. The program has functions to encode, decode, hide and retrieve text from images.
This document summarizes a Python program that hides text inside PNG image files using steganography. The program works by encoding the text as binary and hiding the bits in the blue channel of image pixels. If the blue value is between 0-5, it represents a 1 bit, and values above represent a 0 bit. A delimiter of 15 1's and a 0 is used to mark the end of the hidden text. The program has functions to encode, decode, hide and retrieve text from images.
This document summarizes a Python program that hides text inside PNG image files using steganography. The program works by encoding the text as binary and hiding the bits in the blue channel of image pixels. If the blue value is between 0-5, it represents a 1 bit, and values above represent a 0 bit. A delimiter of 15 1's and a 0 is used to mark the end of the hidden text. The program has functions to encode, decode, hide and retrieve text from images.
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!