@@ -155,26 +155,26 @@ See also: [`im_from_matlab`](@ref).
155155function im_to_matlab end
156156
157157im_to_matlab (X:: AbstractArray{<:Number} ) = X
158- im_to_matlab (img:: AbstractArray{CT} ) where CT<: Colorant = im_to_matlab (eltype (CT), img)
158+ im_to_matlab (img:: AbstractArray{CT} ) where { CT<: Colorant } = im_to_matlab (eltype (CT), img)
159159
160160im_to_matlab (:: Type{T} , img:: AbstractArray{CT} ) where {T,CT<: TransparentColor } =
161161 im_to_matlab (T, of_eltype (base_color_type (CT), img))
162- im_to_matlab (:: Type{T} , img:: AbstractArray{<:Color} ) where T =
162+ im_to_matlab (:: Type{T} , img:: AbstractArray{<:Color} ) where {T} =
163163 im_to_matlab (T, of_eltype (RGB{T}, img))
164- im_to_matlab (:: Type{T} , img:: AbstractArray{<:Gray} ) where T =
164+ im_to_matlab (:: Type{T} , img:: AbstractArray{<:Gray} ) where {T} =
165165 of_eltype (T, channelview (img))
166166
167167# for RGB, only 1d and 2d cases are supported as other cases are not well-defined in MATLAB.
168- im_to_matlab (:: Type{T} , img:: AbstractVector{<:RGB} ) where T =
168+ im_to_matlab (:: Type{T} , img:: AbstractVector{<:RGB} ) where {T} =
169169 im_to_matlab (T, reshape (img, (length (img), 1 )))
170- im_to_matlab (:: Type{T} , img:: AbstractMatrix{<:RGB} ) where T =
170+ im_to_matlab (:: Type{T} , img:: AbstractMatrix{<:RGB} ) where {T} =
171171 PermutedDimsArray (of_eltype (T, channelview (img)), (2 , 3 , 1 ))
172- im_to_matlab (:: Type{T} , img:: AbstractArray{<:RGB} ) where T =
172+ im_to_matlab (:: Type{T} , img:: AbstractArray{<:RGB} ) where {T} =
173173 throw (ArgumentError (" For $(ndims (img)) dimensional color image, manual conversion to MATLAB layout is required." ))
174174
175175if VERSION >= v " 1.6.0-DEV.1083"
176176 # this method allows `data === im_to_matlab(im_from_matlab(data))` for gray image
177- im_to_matlab (:: Type{T} , img:: Base.ReinterpretArray{CT,N,T,<:AbstractArray{T,N}, true} ) where {CT,N,T} =
177+ im_to_matlab (:: Type{T} , img:: Base.ReinterpretArray{CT,N,T,<:AbstractArray{T,N},true} ) where {CT,N,T} =
178178 img. parent
179179else
180180 im_to_matlab (:: Type{T} , img:: Base.ReinterpretArray{CT,N,T,<:AbstractArray{T,N}} ) where {CT,N,T} =
0 commit comments