[Horus] More bitmaps on SD. PNG format used instead of BMP. And yes it's a bad idea given the resources we have.
This commit is contained in:
@@ -49,7 +49,7 @@ with open(sys.argv[2], "w") as f:
|
||||
val = ((Qt.qAlpha(pixel) // 16) << 12) + ((Qt.qRed(pixel) // 16) << 8) + ((Qt.qGreen(pixel) // 16) << 4) + ((Qt.qBlue(pixel) // 16) << 0)
|
||||
values.append(str(val))
|
||||
f.write("const uint16_t __%s[] __ALIGNED = { %s };\n" % (constant, ",".join(values)))
|
||||
f.write("const Bitmap %s(%d, %d, __%s);\n" % (constant, width, height, constant))
|
||||
f.write("const Bitmap %s(BMP_ARGB4444, %d, %d, __%s);\n" % (constant, width, height, constant))
|
||||
elif what == "5/6/5":
|
||||
constant = sys.argv[2].upper()[:-4]
|
||||
values = []
|
||||
@@ -59,7 +59,7 @@ with open(sys.argv[2], "w") as f:
|
||||
val = ((Qt.qRed(pixel) >> 3) << 11) + ((Qt.qGreen(pixel) >> 2) << 5) + ((Qt.qBlue(pixel) >> 3) << 0)
|
||||
values.append(str(val))
|
||||
f.write("const uint16_t __%s[] __ALIGNED = { %s };\n" % (constant, ",".join(values)))
|
||||
f.write("const Bitmap %s(%d, %d, __%s);\n" % (constant, width, height, constant))
|
||||
f.write("const Bitmap %s(BMP_RGB565, %d, %d, __%s);\n" % (constant, width, height, constant))
|
||||
elif what == "5/6/5/8":
|
||||
colors = []
|
||||
writeSize(f, width, height)
|
||||
|
||||
Reference in New Issue
Block a user