Image Steganography is the practice of concealing a file, message, image, or video within a cover image.
- The cover image and secret images are converted to 256x256 pixel greyscale image and then converted into numpy arrays.
- The last 4 binary digits (i.e LSBs) are masked to store the MSBs of secret image.
- The last 4 binary digots of secret image are also hidden, and the first 4 digits are then shifted right so that the result of operation can be merged with the result form step 2.
- The results of step 2 and step 3 are merged.
- The resultant numpy array is then converted to an image.
- The secret image can be retrived, though less in quality, from the last from 4 digits of each element of numpy array obtained at step 4.
I used the Numpy and PIL libraries in Python and created a custom library named Steganography to implement this technique.
The code was simulated, and output was obtained as expected. Though some image quality was lost in the process, the image is still comprehensible.
Steganography: Hiding an image inside another by Kelvin Salton do Prado