# Why does image size increase after steganography?

I am working on a steganography technique. Sometimes I need to send my steganographed images online to my friends but in the process the image gets compressed destroying all the data. I found ways to surpass it by using Google Drive or simply mailing them to the destination. But still I am not able to find a reason as why the size of the image increases (nearly to 30%) after the steganography.

Technique used is

1. Read a character from a file.
2. Convert that character to a string of binary bits (from its ASCII)
3. To make it a 6bit binary string, pad it with appropriate 0s
4. Read two consecutive pixels from an image (left to right)
5. Impose the first three bits of the binary string onto the LSBit of RGB of first pixel (first bit on LSBit of R, second bit on G and third bit on B).
6. Repeat 5 for the next pixel
7. Repeat from 1
• With no info on the steganography technique used, we can only state a generality: compression set aside, in a steganography technique sending an image within an image, the output of the encoder is the hidden image, and the apparent image, so by an entropy argument some natural value of the output size is the sum of the input sizes. That said, it is entirely conceivable to make a steganography encoder that compresses to the point that the output of the encoder is smaller than either of its inputs.
– fgrieu
Jan 31, 2016 at 11:57