@@ -12,28 +12,28 @@ bytes_to_type(::Type{T}, A::Array{UInt8}) where T<:Number = convert(Array{T}, r
12
12
global __images_supported__ = false
13
13
global __matfiles_supported__ = false
14
14
15
- function _channelview (image:: AbstractArray{<:Color } )
15
+ function _channelview (image:: AbstractArray{<:Colorant } )
16
16
__images_supported__ ||
17
- error (" Converting to/from image requires ImageCore package. " )
18
- channelview (image)
17
+ error (" Converting to/from image requires `using ImageCore` " )
18
+ ImageCore . channelview (image)
19
19
end
20
20
21
21
function _colorview (:: Type{T} , array:: AbstractArray{<:Number} ) where T <: Color
22
22
__images_supported__ ||
23
- error (" Converting to image requires ImageCore package. " )
24
- colorview (T, array)
23
+ error (" Converting to image requires `using ImageCore` " )
24
+ ImageCore . colorview (T, array)
25
25
end
26
26
27
27
function _matopen (f:: Function , path:: AbstractString )
28
28
__matfiles_supported__ ||
29
- error (" Reading .mat files requires MAT package. " )
30
- matopen (f, path)
29
+ error (" Reading .mat files requires `using MAT` " )
30
+ MAT . matopen (f, path)
31
31
end
32
32
33
33
function _matread (path:: AbstractString )
34
34
__matfiles_supported__ ||
35
- error (" Reading .mat files requires MAT package. " )
36
- matread (path)
35
+ error (" Reading .mat files requires `using MAT` " )
36
+ MAT . matread (path)
37
37
end
38
38
39
39
@@ -51,11 +51,9 @@ include("UD_English/UD_English.jl")
51
51
function __init__ ()
52
52
# initialize optional dependencies
53
53
@require ImageCore= " a09fc81d-aa75-5fe9-8630-4744c3626534" begin
54
- using ImageCore
55
54
global __images_supported__ = true
56
55
end
57
56
@require MAT= " 23992714-dd62-5051-b70f-ba57cb901cac" begin
58
- using MAT
59
57
global __matfiles_supported__ = true
60
58
end
61
59
end
0 commit comments