Made main().
This commit is contained in:
parent
94b85dba13
commit
1a2745f7a8
|
@ -20,8 +20,7 @@ def write_block(f, image, width=8, height=8, offset_x=0, offset_y=0):
|
||||||
val = image.getpixel((x+offset_x, y+offset_y))
|
val = image.getpixel((x+offset_x, y+offset_y))
|
||||||
f.write(chr(val))
|
f.write(chr(val))
|
||||||
|
|
||||||
if __name__=="__main__":
|
def main():
|
||||||
|
|
||||||
tiled, args = gnu_getopt(sys.argv[1:], "t")
|
tiled, args = gnu_getopt(sys.argv[1:], "t")
|
||||||
|
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
|
@ -53,3 +52,7 @@ if __name__=="__main__":
|
||||||
|
|
||||||
value = (b << 10) + (g << 5) + r
|
value = (b << 10) + (g << 5) + r
|
||||||
pal_output.write(struct.pack("<h", value))
|
pal_output.write(struct.pack("<h", value))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__=="__main__":
|
||||||
|
main()
|
||||||
|
|
Reference in New Issue