Presumed interference between FileIO and Images or FixedPointNumbers
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the two Julia sessions with the supplied lixa.JPG, focusing on the order of GMT image reading and FileIO.load. Start with ImageMagick/src/libmagickwand.jl and FileIO/src/loadsave.jl from the stack trace; done means identifying and resolving the order-dependent loading failure or documenting the confirmed incompatibility.
Written by the indexing model from the issue text.
Description
First, let me apologize for this kinda difficult to reproduce issue report but it depends on a interaction with a C library that I just fixed for this to work. The background is that explained in this thread
What happens is the following. Somehow the order by which I load an image is important.
This works well:
using FixedPointNumbers, Images, FileIO, GMT
julia> img1=load("lixa.JPG")
4×3 Array{RGB{N0f8},2}:
RGB{N0f8}(0.282,0.263,0.239) RGB{N0f8}(0.514,0.486,0.373) RGB{N0f8}(0.89,0.843,0.694)
RGB{N0f8}(0.216,0.176,0.137) RGB{N0f8}(0.871,0.835,0.714) RGB{N0f8}(0.278,0.227,0.09)
RGB{N0f8}(0.333,0.267,0.204) RGB{N0f8}(0.969,0.91,0.78) RGB{N0f8}(0.298,0.239,0.11)
RGB{N0f8}(0.596,0.502,0.408) RGB{N0f8}(0.671,0.6,0.459) RGB{N0f8}(0.239,0.18,0.067)
julia> I = gmt("read lixa.JPG -Ti"); imf8 = reinterpret(N0f8, I.image);
julia> img2 = colorview(RGB, imf8)
4×3 Array{RGB{N0f8},2}:
RGB{N0f8}(0.282,0.263,0.239) RGB{N0f8}(0.514,0.486,0.373) RGB{N0f8}(0.89,0.843,0.694)
RGB{N0f8}(0.216,0.176,0.137) RGB{N0f8}(0.871,0.835,0.714) RGB{N0f8}(0.278,0.227,0.09)
RGB{N0f8}(0.333,0.267,0.204) RGB{N0f8}(0.969,0.91,0.78) RGB{N0f8}(0.298,0.239,0.11)
RGB{N0f8}(0.596,0.502,0.408) RGB{N0f8}(0.671,0.6,0.459) RGB{N0f8}(0.239,0.18,0.067)
But if I just revert the order of the operations
using FixedPointNumbers, Images, FileIO, GMT
julia> I = gmt("read lixa.JPG -Ti"); imf8 = reinterpret(N0f8, I.image);
julia> img2 = colorview(RGB, imf8)
4×3 Array{RGB{N0f8},2}:
RGB{N0f8}(0.282,0.263,0.239) RGB{N0f8}(0.514,0.486,0.373) RGB{N0f8}(0.89,0.843,0.694)
RGB{N0f8}(0.216,0.176,0.137) RGB{N0f8}(0.871,0.835,0.714) RGB{N0f8}(0.278,0.227,0.09)
RGB{N0f8}(0.333,0.267,0.204) RGB{N0f8}(0.969,0.91,0.78) RGB{N0f8}(0.298,0.239,0.11)
RGB{N0f8}(0.596,0.502,0.408) RGB{N0f8}(0.671,0.6,0.459) RGB{N0f8}(0.239,0.18,0.067)
julia> img1=load("lixa.JPG")
Error encountered while loading "v:\lixa.JPG".
Fatal error:
ERROR: RegistryKeyLookupFailed `CoderModulesPath' @ error/module.c/GetMagickModulePath/666
in error(::ImageMagick.MagickWand) at c:\j\.julia\v0.5\ImageMagick\src\libmagickwand.jl:198
in readimage(::ImageMagick.MagickWand, ::String) at c:\j\.julia\v0.5\ImageMagick\src\libmagickwand.jl:277
in #load_#20(::Type{T}, ::String, ::Void, ::Function, ::String) at c:\j\.julia\v0.5\ImageMagick\src\ImageMagick.jl:72
in #load#13(::Array{Any,1}, ::Function, ::FileIO.File{FileIO.DataFormat{:JPEG}}) at c:\j\.julia\v0.5\ImageMagick\src\ImageMagick.jl:51
in anonymous at .\<missing>:?
in eval(::Module, ::Any) at .\boot.jl:234
in #load#17(::Array{Any,1}, ::Function, ::FileIO.File{FileIO.DataFormat{:JPEG}}) at c:\j\.julia\v0.5\FileIO\src\loadsave.jl:87
in load(::FileIO.File{FileIO.DataFormat{:JPEG}}) at c:\j\.julia\v0.5\FileIO\src\loadsave.jl:75
in #load#13(::Array{Any,1}, ::Function, ::String) at c:\j\.julia\v0.5\FileIO\src\loadsave.jl:45
in load(::String) at c:\j\.julia\v0.5\FileIO\src\loadsave.jl:45
I'm attaching the (tiny tiny) test image for the case you find it useful

- Dominant language
- Julia
- Stars
- 228
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaIO/FileIO.jl
-
Drop the hard `Pkg` dependencyPossibly taken @thchr claimed this 26 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Add SVGZ formatOpen
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
All issues in JuliaIO/FileIO.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
brown-ccv/Chamber.jl#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAstro/SolarPosition.jl#143 ·
-
distributions
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaBayes/Wren.jl#404 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAI/MLJTransforms.jl#113 ·
Maintainers usually reply within 1 day