diff --git a/src/PIL/BmpImagePlugin.py b/src/PIL/BmpImagePlugin.py index d1517df27..9d780bcca 100644 --- a/src/PIL/BmpImagePlugin.py +++ b/src/PIL/BmpImagePlugin.py @@ -229,7 +229,7 @@ class BmpImageFile(ImageFile.ImageFile): palette = read(padding * file_info["colors"]) greyscale = True indices = ( - (0, file_info["colors"]) + (0, 255) if file_info["colors"] == 2 else list(range(file_info["colors"])) )