[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:
Bertrand Songis
2016-02-29 22:17:47 +01:00
parent f65e42833e
commit 1fd1e141f2
34 changed files with 274 additions and 98 deletions
+2 -2
View File
@@ -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)