Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > least significant bit ?

Reply
Thread Tools

least significant bit ?

 
 
q666
Guest
Posts: n/a
 
      03-01-2007
Hi
I have a question about Steganography in ruby how could i write and read
some data (bits) from a picture (for example a bmp file) hmm heh i think
i known something about how the LSB works //i read the wikipedia but
i have problem whit the source i dont know how to write it. ?

q666

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Jan Svitok
Guest
Posts: n/a
 
      03-01-2007
On 3/1/07, q666 <(E-Mail Removed)> wrote:
> Hi
> I have a question about Steganography in ruby how could i write and read
> some data (bits) from a picture (for example a bmp file) hmm heh i think
> i known something about how the LSB works //i read the wikipedia but
> i have problem whit the source i dont know how to write it. ?


if you can read and write bytes of the picture you can set any bit by

byte |= 1 << bit_position (zero based)

011110010 | (1 << 2) == 011110010 | 100 = 011110*1*10

clearing a bit:

byte &= ~(1 << bit_position)

(at least this is the general idea, I might be a bit wrong

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
most significant and less significant address a01lida VHDL 2 11-16-2008 12:28 PM
Need regular expression for at least 7 characters and at least 1 special chatacter AAaron123 ASP .Net 0 10-03-2008 01:25 PM
Significant Digits (Significant Figures) SMH Javascript 0 01-07-2007 09:52 AM
set and reset the least significant bit of a address onsbomma C Programming 63 03-21-2005 04:28 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit,Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new! Ionizer Computer Support 1 01-01-2004 07:27 PM



Advertisments