From 4be146cf2783beeb3dd45621d660beec3ce7003d Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 28 Aug 2013 20:18:13 +0200 Subject: [PATCH] Fix bytes which should be bytearray --- PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/Image.py b/PIL/Image.py index cafc5a22f..794ee4913 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -718,7 +718,7 @@ class Image: if self.mode == "L" and mode == "RGBA" and "transparency" in self.info: from PIL import ImagePalette self.mode = "P" - bytePalette = bytes([i//3 for i in range(768)]) + bytePalette = bytearray([i//3 for i in range(768)]) self.palette = ImagePalette.raw("RGB", bytePalette) self.palette.dirty = 1 self.load()