Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load colorview Images #259

Open
aquatiko opened this issue Jul 8, 2019 · 0 comments
Open

Can't load colorview Images #259

aquatiko opened this issue Jul 8, 2019 · 0 comments

Comments

@aquatiko
Copy link

aquatiko commented Jul 8, 2019

Error seems to appear when loading a saved file in a colorview format.

Steps to reproduce:

using JLD, Images
tmp = colorview(RGB, rand(10,10), rand(10,10), rand(10,10))
save("test.jld", "arr", tmp)

tmp2 = load("test.jld", "arr")        # gives error

StackTrace:

error parsing type string MappedArrays.MultiMappedArray{ColorTypes.RGB{Core.Float64},2,Core.Tuple{Core.Array{Core.Float64,2},Core.Array{Core.Float64,2},Core.Array{Core.Float64,2}},Core.Type{ColorTypes.RGB{Core.Float64}},ImageCore.#extractchannels}
ERROR: syntax: incomplete: premature end of input
Stacktrace:
 [1] eval at ./boot.jl:328 [inlined]
 [2] eval at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:3 [inlined]
 [3] _julia_type(::String) at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:983
 [4] julia_type(::String) at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:30
 [5] jldatatype(::JLD.JldFile, ::HDF5.HDF5Datatype) at /home/rohit/.julia/packages/JLD/1BoSz/src/jld_types.jl:701
 [6] read(::JLD.JldDataset) at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:370
 [7] read(::JLD.JldFile, ::String) at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:346
 [8] #42 at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:1240 [inlined]
 [9] #jldopen#14(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(JLD, Symbol("##42#43")){String}, ::String, ::Vararg{String,N} where N) at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:246
 [10] jldopen at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:244 [inlined]
 [11] load at /home/rohit/.julia/packages/JLD/1BoSz/src/JLD.jl:1239 [inlined]
 [12] #load#13(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::String) at /home/rohit/.julia/packages/FileIO/JAtC1/src/loadsave.jl:118
 [13] load(::String, ::String) at /home/rohit/.julia/packages/FileIO/JAtC1/src/loadsave.jl:118
 [14] top-level scope at none:0

My guess is it's due to the memory mapping of array.
Do we have any workaround for this?

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

No branches or pull requests

1 participant