remove a float/int problem

This commit is contained in:
David Schmidt 2013-05-23 19:45:39 +03:00
parent 12cea19280
commit d78371cccd

View File

@ -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