From d78371cccd94cb8d0c0462e3a176644865a5f1a1 Mon Sep 17 00:00:00 2001 From: David Schmidt Date: Thu, 23 May 2013 19:45:39 +0300 Subject: [PATCH] remove a float/int problem --- PIL/GifImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py index 1254a396f..0a6bd9c44 100644 --- a/PIL/GifImagePlugin.py +++ b/PIL/GifImagePlugin.py @@ -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