Merge pull request #1110 from jkotan/nextafter2
fix for makeARGB error after #955
This commit is contained in:
commit
f61d38ba8b
@ -1134,7 +1134,9 @@ def makeARGB(data, lut=None, levels=None, scale=None, useRGBA=False):
|
||||
if minVal != 0 or maxVal != scale:
|
||||
if minVal == maxVal:
|
||||
maxVal = np.nextafter(maxVal, 2*maxVal)
|
||||
data = rescaleData(data, scale/(maxVal-minVal), minVal, dtype=dtype)
|
||||
rng = maxVal-minVal
|
||||
rng = 1 if rng == 0 else rng
|
||||
data = rescaleData(data, scale/rng, minVal, dtype=dtype)
|
||||
|
||||
profile()
|
||||
# apply LUT if given
|
||||
|
Loading…
Reference in New Issue
Block a user