Gray(NaN) and RGB(NaN) are not showable:
julia> Gray(NaN)
Error showing value of type Gray{Float64}:
ERROR: ArgumentError: element type N0f8 is an 8-bit type representing 256 values from 0.0 to 1.0,
but the values (NaN, 1.0) do not lie within this range.
See the READMEs for FixedPointNumbers and ColorTypes for more information.
The error message is a bit misleading, too.
ImageShow uses ImageCore.clamp01nan to handle this, I think we can perhaps move clamp01 and clamp01nan to Colors.
https://github.com/JuliaImages/ImageCore.jl/blob/a8f3d2c52070d9c166e1657ba25e72c8df00c742/src/map.jl#L3-L39
Gray(NaN)andRGB(NaN)are not showable:The error message is a bit misleading, too.
ImageShow uses
ImageCore.clamp01nanto handle this, I think we can perhaps moveclamp01andclamp01nantoColors.https://github.com/JuliaImages/ImageCore.jl/blob/a8f3d2c52070d9c166e1657ba25e72c8df00c742/src/map.jl#L3-L39