commit | 6ae77dddce337a16bccfb42e369c3cc2a4c9077e | [log] [tgz] |
---|---|---|
author | Brian Silverman <brians> | Fri Mar 29 22:28:08 2013 -0700 |
committer | Brian Silverman <brians> | Fri Mar 29 22:30:38 2013 -0700 |
tree | b74f780304cfc251c0f05ed0cf98d2a73eddf2d9 | |
parent | 8fcd87533b76ca5b4b83fb6031ddf0de5e03eb57 [diff] [blame] |
lots of vision stuff from Ben
diff --git a/vision/bmp_stream/bmp.rb b/vision/bmp_stream/bmp.rb new file mode 100644 index 0000000..122c9de --- /dev/null +++ b/vision/bmp_stream/bmp.rb
@@ -0,0 +1,11 @@ +class BMPHeader + def initialize(width,height) + @width = width + @height = height + end + def text() + size = @width * @height * 3 + return ["BM",size + 54,"\0\0\0\0",54,40,@width, + @height,1,24,0,size,2835,2835,0,0].pack("a2Ia4IIIIssIIIIII") + end +end