Skip to content

Commit ec0f7a3

Browse files
authored
Avoid using the deprecated ColorView type (#185)
It's been deprecated a long time, but only as a call, not as a binding.
1 parent 39cf88a commit ec0f7a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ImageMagick.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ mapIM(x::Normed) = x
270270
to_contiguous(A::Array) = A
271271
to_contiguous(A::AbstractArray) = collect(A)
272272
to_contiguous(A::BitArray) = convert(Array{Bool}, A)
273-
to_contiguous(A::ColorView) = to_contiguous(channelview(A))
273+
if isdefined(ImageCore, :ColorView)
274+
to_contiguous(A::ColorView) = to_contiguous(channelview(A))
275+
end
274276

275277
to_explicit(A::Array{C}) where {C<:Colorant} = to_explicit(channelview(A))
276278
function to_explicit(A::AbstractArray)

0 commit comments

Comments
 (0)