var fw = new FileWriter.open(path)
# Write bitmap header
for x in [0..self.bitmap_header.length[ do
- fw.write(self.bitmap_header[x].ascii.to_s)
+ fw.write(self.bitmap_header[x].code_point.to_s)
end
# Write dib header
for x in [0..self.dib_header.length[ do
- fw.write(self.dib_header[x].ascii.to_s)
+ fw.write(self.dib_header[x].code_point.to_s)
end
# Write color table (if any)
# Write data (no padding for now)
var red = pixel >> 16
var green = (pixel & 0x00FF00) >> 8
var blue = pixel & 0x000000FF
- fw.write(red.ascii.to_s)
- fw.write(green.ascii.to_s)
- fw.write(blue.ascii.to_s)
+ fw.write(red.code_point.to_s)
+ fw.write(green.code_point.to_s)
+ fw.write(blue.code_point.to_s)
end
end
fw.close