I want to realize the project about convert image to python module ,but when I use the command python ./imgtobitmap.py t1.png 3 >test.py
an error message:
File "./imgtobitmap.py", line 101, in
main()
File "./imgtobitmap.py", line 43, in main
((palette[color*3] & 0xF8) << 8)
IndexError: list index out of range
so I change the parameter (bits) to 2 . Luckily, it succeed ,but I execute the project code a new error coming:
Traceback (most recent call last):
File "", line 60, in
File "", line 59, in main
TypeError: can't convert str to int
I want to realize the project about convert image to python module ,but when I use the command python ./imgtobitmap.py t1.png 3 >test.py an error message:
so I change the parameter (bits) to 2 . Luckily, it succeed ,but I execute the project code a new error coming:
Maybe the error caused by the parameter(bits)
Here are my codes:
Convert result Test.py