From ec0f7a393c06311b2d239da170cb33c183252e21 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Fri, 28 Aug 2020 08:45:00 -0500 Subject: [PATCH] Avoid using the deprecated ColorView type (#185) It's been deprecated a long time, but only as a call, not as a binding. --- src/ImageMagick.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ImageMagick.jl b/src/ImageMagick.jl index 01a5855..5bea05a 100755 --- a/src/ImageMagick.jl +++ b/src/ImageMagick.jl @@ -270,7 +270,9 @@ mapIM(x::Normed) = x to_contiguous(A::Array) = A to_contiguous(A::AbstractArray) = collect(A) to_contiguous(A::BitArray) = convert(Array{Bool}, A) -to_contiguous(A::ColorView) = to_contiguous(channelview(A)) +if isdefined(ImageCore, :ColorView) + to_contiguous(A::ColorView) = to_contiguous(channelview(A)) +end to_explicit(A::Array{C}) where {C<:Colorant} = to_explicit(channelview(A)) function to_explicit(A::AbstractArray)