Skip to content

Commit

Permalink
Merge pull request #565 from timholy/teh/float32_0.5
Browse files Browse the repository at this point in the history
Fix for removal of float32/float64. Fixes ImageView issue 102
  • Loading branch information
timholy authored Oct 17, 2016
2 parents 01c7cf0 + 5eb905a commit 1b3536e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/map.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 1b3536e

Please sign in to comment.