From ca3e2103131f66a3fe414987bd056c1d8f1a3535 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 25 May 2019 16:05:07 +1000 Subject: [PATCH] Simplified definition of values --- src/PIL/BmpImagePlugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PIL/BmpImagePlugin.py b/src/PIL/BmpImagePlugin.py index f4c1436a1..8426e2497 100644 --- a/src/PIL/BmpImagePlugin.py +++ b/src/PIL/BmpImagePlugin.py @@ -66,7 +66,8 @@ class BmpImageFile(ImageFile.ImageFile): # -------------------------------------------------- BMP Compression values COMPRESSIONS = {"RAW": 0, "RLE8": 1, "RLE4": 2, "BITFIELDS": 3, "JPEG": 4, "PNG": 5} - RAW, RLE8, RLE4, BITFIELDS, JPEG, PNG = 0, 1, 2, 3, 4, 5 + for k, v in COMPRESSIONS.items(): + vars()[k] = v def _bitmap(self, header=0, offset=0): """ Read relevant info about the BMP """