Skip to content

Conversation

@timholy
Copy link
Member

@timholy timholy commented Sep 17, 2017

Base julia has distinguished one and oneunit, and we should do so, too. This is sure to cause quite a few deprecation warnings in dependent packages (e.g., Images).

This also adds support for middle and fixes #56 (in separate commits).


one{C<:AbstractRGB}(::Type{C}) = C(1,1,1)
one{C<:TransparentRGB}(::Type{C}) = C(1,1,1,1)
oneunit{C<:AbstractRGB}(::Type{C}) = C(1,1,1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use where, you'll avoid deprecation warnings on 0.7.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to save some work so that femocleaner feels valued. Even bots have feelings.

for f in (:min, :max)
@eval begin
@deprecate($f{T<:Gray}(x::Number, y::AbstractArray{T}),
@compat $f.(x, y))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the package no longer supports 0.4, you can drop the @compat for dot broadcast.

@codecov-io
Copy link

Codecov Report

Merging #80 into master will increase coverage by 8.7%.
The diff coverage is 90.62%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #80     +/-   ##
=========================================
+ Coverage   67.16%   75.87%   +8.7%     
=========================================
  Files           2        1      -1     
  Lines         265      199     -66     
=========================================
- Hits          178      151     -27     
+ Misses         87       48     -39
Impacted Files Coverage Δ
src/ColorVectorSpace.jl 75.87% <90.62%> (+5.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 101823d...c68b925. Read the comment docs.

@timholy timholy merged commit 39cd626 into master Sep 19, 2017
@timholy timholy deleted the teh/middle branch September 19, 2017 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scalar multiplication fails on RGB24

4 participants