From 5eb905ad84fc2f9e8377de256d20e95f03c54388 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sun, 16 Oct 2016 20:53:23 -0500 Subject: [PATCH] Fix for removal of float32/float64. Fixes ImageView issue 102 --- src/map.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/map.jl b/src/map.jl index 6f33787a..47d0db3d 100644 --- a/src/map.jl +++ b/src/map.jl @@ -707,8 +707,13 @@ for (fn,T) in ((:float32, Float32), (:float64, Float64), (:ufixed8, UFixed8), end $fn{C<:Colorant}(img::AbstractImage{C}) = shareproperties(img, $fn(data(img))) end + if VERSION >= v"0.5.0" + @eval begin + $fn(x::Number) = convert($T, x) + $fn(str::AbstractString) = parse($T, str) + end + end end - ufixedsc{T<:UFixed}(::Type{T}, img::AbstractImageDirect) = immap(mapinfo(T, img), img) ufixed8sc(img::AbstractImageDirect) = ufixedsc(UFixed8, img)