tangstad/helds
tangstad
/
helds
Archived
1
0
Fork 0

Removed debugprinting.

This commit is contained in:
Truls Alexander Tangstad 2005-11-09 20:43:18 +00:00
parent 2e93bb4702
commit 1e69b994f3
1 changed files with 1 additions and 5 deletions

View File

@ -10,7 +10,6 @@ def split_seq(seq, splitsize):
newseq = []
while seq:
newseq.append(seq[:splitsize])
print "elem:", newseq[-1]
seq = seq[splitsize:]
return newseq
@ -30,12 +29,9 @@ if __name__=="__main__":
if len(sys.argv) > 3:
pal_output = open(sys.argv[3], "wb")
print "entries:", len(im.palette.palette)
for i, color in enumerate(split_seq(im.palette.palette, 3)):
for color in split_seq(im.palette.palette, 3):
r, g, b = map(lambda col : col >> 3, map(ord, color))
print "rgb:", r, g, b
value = (b << 10) + (g << 5) + r
print "color", i, ":", value
pal_output.write(struct.pack("<h", value))