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