From: Kamaljeet Saini Date: 2009-01-29T10:39:43+09:00 Subject: Re: Converting binary image file to bmp file using RMagick2.0 The code sent work prefectly fine. Thanks you so much for this help. Possible to help to understand the following code. Understanding is important i guess for future or any site that i can refer in regards to the following code. - whats happeing in this "file.unpack('S*')." - what this kind of code mean "0xF800" - what this means ">> 11) << 3)" file.unpack('S*').each { |x| one << (((x & 0xF800) >> 11) << 3) two << (((x & 0x7E0) >> 5) << 2) three << ((x &0x1F)<< 3) } thanks -- Posted via http://www.ruby-forum.com/.