- -- X- and Y- origin
- self:littleendian(2, 0)
- self:littleendian(2, 0)
- -- width and height
- self:littleendian(2, self.width)
- self:littleendian(2, self.height)
- -- pixel depth
- self:insert(24)
- -- image descriptor
- self:insert(0)
+ self.data = self.data
+ .. string.char(0, 0) -- X-origin
+ .. string.char(0, 0) -- Y-origin
+ .. string.char(self.width % 256, math.floor(self.width / 256)) -- width
+ .. string.char(self.height % 256, math.floor(self.height / 256)) -- height
+ .. string.char(24) -- pixel depth (RGB = 3 bytes = 24 bits)
+ .. string.char(0) -- image descriptor