Allow other transforms without losing 8-bit.
[naja.git] / naja / widgets / image_box.py
index 5709cec6ba8817caffd3b92171311c37573ecbfa..32787dfce793d9813a904e899ba55cf81be2c0bd 100644 (file)
@@ -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):