mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
remove a float/int problem
This commit is contained in:
parent
12cea19280
commit
d78371cccd
|
@ -386,7 +386,7 @@ def getheader(im, palette=None, info=None):
|
|||
|
||||
# calculate the palette size for the header
|
||||
import math
|
||||
colorTableSize = math.ceil(math.log(len(paletteBytes)//3, 2))-1
|
||||
colorTableSize = int(math.ceil(math.log(len(paletteBytes)//3, 2)))-1
|
||||
if colorTableSize < 0: colorTableSize = 0
|
||||
s.append(o8(colorTableSize + 128)) # size of global color table + global color table flag
|
||||
s.append(o8(0) + o8(0)) # background + reserved/aspect
|
||||
|
|
Loading…
Reference in New Issue
Block a user