Heres a little backstory. I was doing some Steganography research and came upon this wiki article that said this image of a tree has a cat inside it! WHAT? Ofcourse I was curious and wanted to try to see if I could do it. Looked online and couldn't find zip, I did find a SO forum, but it was useless lol. So it became my mission to figure out how to extract the cat. The description made it sound really simple, and hey it actually was!
"Image of a tree with a steganographically hidden image. The hidden image is revealed by removing all but the two least significant bits of each color component and a subsequent normalization. The hidden image is shown below."
So suprisingly, googling didn't actually take that long (THANK GOD). I was super worried I wouldn't find a soultion, but then I came upon a god send of an article on "Steganography" and how it actually works inserting an image inside an image. (https://towardsdatascience.com/steganography-hiding-an-image-inside-another-77ca66b2acb1) Bless you Kelvin Salton do Prado.
So basically, every pixel has 3 layers of color on top of it. Red, Green, and Blue. You need this 3 colors to create a pixel, and a pixel could a wide variety of colors.
R, G, and B will all be a different decimal value, which we will represent in binary form. We know that binary number is made up of 8 bits, and the rightmost bit is the least signif bit and the leftmost is the most signif bit. Meaning if we change the last bit, the value will not change that much. At most, by ONE.
As the image above, if we changed the last big of 10110001 -> 10110000, it would be the val 176.
We are going to take advantage of that and manipulate the least significant bit in the pixel map to insert our image there.
The code in the repo follow the image right above. Knowing that we keep the last two least signifcant bits in the tree png, we are going to take those values and tack on 6 0's, to create a new byte. And at the end we are going to create a whole new image, and it should be the cat!
