From d1c5ae73b379be0929e0260853875baee7261b9a Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 17 May 2014 01:24:22 +0200 Subject: [PATCH] Allow other transforms without losing 8-bit. --- naja/widgets/image_box.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/naja/widgets/image_box.py b/naja/widgets/image_box.py index 5709cec..32787df 100644 --- a/naja/widgets/image_box.py +++ b/naja/widgets/image_box.py @@ -8,9 +8,11 @@ from naja.widgets.base import Widget class ImageBox(Widget): """Widget which holds an image.""" - def __init__(self, pos, image, transforms=(EIGHT_BIT,)): + def __init__(self, pos, image, eight_bit=True, transforms=()): super(ImageBox, self).__init__(pos) self.image = image + if eight_bit: + transforms = (EIGHT_BIT,) + transforms self.transforms = transforms def prepare(self): -- 2.34.1