Code covered by the BSD License  

Highlights from
Embedding/ Hiding Image Within Image (with LSB encoding)

image thumbnail

Embedding/ Hiding Image Within Image (with LSB encoding)

by

 

20 Apr 2012 (Updated )

The objective is to illustrate how an image may be embedded or hidden within another given image.

convertInt8ToBitStream( dataToBeInsertedAsBits_inDec )
function bitStream = convertInt8ToBitStream( dataToBeInsertedAsBits_inDec )
%CONVERTINT8TOBITSTREAM 
numberOfTextChar = length(dataToBeInsertedAsBits_inDec);

    bitStream = '';
    for i = 1:numberOfTextChar
        bits = dec2bin(dataToBeInsertedAsBits_inDec(i));
            while(length(bits) < 8)     % keep appending '0' to reach 8-bit length
                bits = strcat('0', bits); 
            end          
        bitStream = strcat(bitStream, bits);
    end

end

Contact us