Closed timholy closed 10 years ago
OK, I do believe we can merge this.
This is (mildly) breaking. A few situations will likely trigger an error:
A = Array(RGB, sz)
change to A = Array(RGB{T}, sz)
where T is a Fractional (FloatingPoint or FixedPoint) type (formerly it would hve been RGB{Float64}
.rgb = [RGB(g, g, g) for g in gray]
might need to change to rgb = [RGB{Float64}(g, g, g) etc]
, for example.Here are the packages that depend on Color.jl, together with what I know about them:
I was intending to submit PRs or at least raise issues in most of these, but it looks like it may not be necessary. Perhaps a brief public service announcement on julia-users would make sense, though.
This code makes me happy. I love that we're not forced to either make compromises or implement multiple versions of everything, as we would be in many other languages.
Agreed, Julia is very nice that way.
Thanks for merging!
OK if I tag a new version in the next 24 hrs? I'll try to coordinate a new release of Images to go with it, since that's the one clearly-broken package.
Gadfly tests look good, so it's fine with me.
OK. Since this is breaking, should we increment the minor version?
Might want to look closer at PyPlot. Even though there aren't any tests, it does use ColorValues
extensively. Cc: @stevengj
Probably PyPlot will now need to use convert(RGB{Float64}, c::ColorValue)
instead of convert(RGB, c)
. I don't see any other obvious changes that are required, but I will update PyPlot as needed once this is merged.
Thanks, @stevengj
Actually, it looks like it works as-is, because your fallback convert
method is to the Float64
type.
That was the plan, glad to hear it actually worked.
Tagged 0.3.0
DO NOT MERGE YET: waiting on https://github.com/JeffBezanson/FixedPoint.jl/pull/2.This implements #42. Tedious but hopefully well worth it. I also added lots of conversion tests, and this caught at least one missing method.
I'm pretty excited about what this will allow in Images!