projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf09c0a
)
Allow other transforms without losing 8-bit.
author
Simon Cross
<hodgestar@gmail.com>
Fri, 16 May 2014 23:24:22 +0000
(
01:24
+0200)
committer
Simon Cross
<hodgestar@gmail.com>
Fri, 16 May 2014 23:26:53 +0000
(
01:26
+0200)
naja/widgets/image_box.py
patch
|
blob
|
history
diff --git
a/naja/widgets/image_box.py
b/naja/widgets/image_box.py
index 5709cec6ba8817caffd3b92171311c37573ecbfa..32787dfce793d9813a904e899ba55cf81be2c0bd 100644
(file)
--- 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):