Brian Silverman | 6ae77dd | 2013-03-29 22:28:08 -0700 | [diff] [blame^] | 1 | class BMPHeader |
2 | def initialize(width,height) | ||||
3 | @width = width | ||||
4 | @height = height | ||||
5 | end | ||||
6 | def text() | ||||
7 | size = @width * @height * 3 | ||||
8 | return ["BM",size + 54,"\0\0\0\0",54,40,@width, | ||||
9 | @height,1,24,0,size,2835,2835,0,0].pack("a2Ia4IIIIssIIIIII") | ||||
10 | end | ||||
11 | end |