handle uint16 rgb(a) with no levels same as levels=[0, 65535]
This commit is contained in:
parent
f59097a484
commit
eba908632a
@ -427,6 +427,11 @@ class ImageItem(GraphicsObject):
|
|||||||
if levels is not None and levels.ndim != 1:
|
if levels is not None and levels.ndim != 1:
|
||||||
# can't handle multi-channel levels
|
# can't handle multi-channel levels
|
||||||
break
|
break
|
||||||
|
if image.dtype == self._xp.uint16 and levels is None and \
|
||||||
|
image.ndim == 3 and image.shape[2] in (3, 4):
|
||||||
|
# uint16 rgb(a) can't be directly displayed, so make them
|
||||||
|
# pass through effective lut processing
|
||||||
|
levels = [0, 65535]
|
||||||
if levels is None and lut is None:
|
if levels is None and lut is None:
|
||||||
# nothing to combine
|
# nothing to combine
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user