Fixed issue where ImageItem data size would be 0 due to colormap.

This commit is contained in:
HashSplat 2017-08-08 14:58:33 -04:00
parent 2dc31b53da
commit 70831245a8

View File

@ -401,7 +401,8 @@ class ImageItem(GraphicsObject):
image = image.transpose((1, 0, 2)[:image.ndim])
argb, alpha = fn.makeARGB(image, lut=lut, levels=levels)
self.qimage = fn.makeQImage(argb, alpha, transpose=False)
if argb.size > 0:
self.qimage = fn.makeQImage(argb, alpha, transpose=False)
def paint(self, p, *args):
profile = debug.Profiler()