From: Simon Cross Date: Fri, 16 May 2014 23:24:22 +0000 (+0200) Subject: Allow other transforms without losing 8-bit. X-Git-Tag: 0.1~152 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=d1c5ae73b379be0929e0260853875baee7261b9a;p=naja.git Allow other transforms without losing 8-bit. --- 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):