mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Update ImagePalette.py
According to __init__, using `len(self.mode)` might be better. Tested on my machine.
This commit is contained in:
parent
e9821edd94
commit
8755bda4e3
|
@ -101,7 +101,7 @@ class ImagePalette:
|
|||
fp.write("# Mode: %s\n" % self.mode)
|
||||
for i in range(256):
|
||||
fp.write("%d" % i)
|
||||
for j in range(i*3, i*3+3):
|
||||
for j in range(i*len(self.mode), (i+1)*len(self.mode)):
|
||||
try:
|
||||
fp.write(" %d" % self.palette[j])
|
||||
except IndexError:
|
||||
|
|
Loading…
Reference in New Issue
Block a user