timholy/Images.jl — pull request #210 by kmsquire (2014-10-20 18:51:30+00:00)
Title: Use Ufixed8 for ScaleMinMax in sc(...)

Before this change:

```julia
julia> typeof(f)
Array{Float64,2}

julia> sc(f)
ERROR: `ScaleMinMax{To,From,S<:FloatingPoint}` has no method matching ScaleMinMax{To,From,S<:FloatingPoint}(::Array{Float64,2})
in sc at /Users/kevin/.julia/v0.3/Images/src/map.jl:481

julia> sc(arr, 0, 0.7)
WARNING: (ScaleMinMax{T<:Real})(img::AbstractArray{T},mn,mx) is deprecated, use ScaleMinMax(Ufixed8,img,mn,mx) instead.
in sc at /Users/kevin/.julia/v0.3/Images/src/map.jl:482
4x4 Array{UfixedBase{Uint8,8},2}:
0.0 0.0 0.0 0.0
0.0 0.714 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
```

After:

```julia
julia> arr[2,2] = 0.5
0.5

julia> sc(arr)
4x4 Array{UfixedBase{Uint8,8},2}:
0.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0

julia> sc(arr, 0.0, 0.75)[2,2]
Ufixed8(0.667)
```

`sc` isn't actually documented, so it's unclear to me if this should be merged, or if `sc` should simply go away...