X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fwidgets%2Fimage_box.py;h=32787dfce793d9813a904e899ba55cf81be2c0bd;hb=8e035c9b200012a42f991893b7093856225e9212;hp=5709cec6ba8817caffd3b92171311c37573ecbfa;hpb=b45d28f06dc88f85be83d6e5e3d7d05363e41df9;p=naja.git 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):