I need to hide message in picture, for example
pixels = []
File.open("file.jpg","rb").each_line{|line| pixels.push line}
in first element of pixels array we have string => "\a\a\b\a\x06\n"
to show lsb we can use
pixels[0].unpack('b*')
=> ["111000001110000000010000111000000110000001010000"]
if we want to see what is it in ascii we use
pixels[0].unpack('C*')
=> [7, 7, 8, 7, 6, 10]
What should i do to organize read\write secret message mechanism in least significant bit?
I had founded an answer to this question and I had written an article here http://blog.rubyruby.ru/blog/2014/03/14/bitmap_images_and_lsb_hiding/ with examples