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

Packages needed #41

Closed
mcabbott opened this issue Jan 14, 2021 · 4 comments
Closed

Packages needed #41

mcabbott opened this issue Jan 14, 2021 · 4 comments

Comments

@mcabbott
Copy link
Contributor

While the readme example uses Images, TestImages, ImageInTerminal, I also need to install ImageMagick, QuartzImageIO before it will work. And, I do not need the whole Images, ImageCore is sufficient.

I'm not sure whether this is a problem with this package, or with TestImages, or elsewhere. Or whether this is a mac-specific problem the package manager can't solve?

Here's the error message, installing into a fresh project; it looks the same with Images instead of ImageCore:

julia> using ImageCore, TestImages, ImageInTerminal
[ Info: Precompiling ImageCore [a09fc81d-aa75-5fe9-8630-4744c3626534]
[ Info: Precompiling TestImages [5e47fb64-e119-507b-a336-dd2b206d9990]
[ Info: Precompiling ImageInTerminal [d8c32880-2388-543b-8c61-d9f865259254]

julia> testimage("cameraman")
Errors encountered while loading "/Users/me/.julia/artifacts/dd57ad5ce3051ad646bfc799a626a0048015d9a2/cameraman.tif".
All errors:
===========================================
ArgumentError: Package QuartzImageIO not found in current path:
- Run `import Pkg; Pkg.add("QuartzImageIO")` to install the QuartzImageIO package.

===========================================
ArgumentError: Package ImageMagick not found in current path:
- Run `import Pkg; Pkg.add("ImageMagick")` to install the ImageMagick package.

===========================================

Fatal error:
ERROR: ArgumentError: Package QuartzImageIO not found in current path:
- Run `import Pkg; Pkg.add("QuartzImageIO")` to install the QuartzImageIO package.

...

julia> versioninfo()
Julia Version 1.5.2
Commit 539f3ce943 (2020-09-23 23:17 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 4
  JULIA_PKG_SERVER = https://geo.pkg.julialang.org

After installing ImageMagick & QuartzImageIO, but without using them, it works as expected:

julia> testimage("cameraman")
512×512 Array{Gray{N0f8},2} with eltype Gray{Normed{UInt8,8}}:
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
@johnnychen94
Copy link
Member

Yes, this is an expected behavior based on the design of FileIO.

In short words, FileIO is the IO frontend where you can use the unified API load to load an image, FileIO does not provide any image loading implementations; it simply uses whatever available image IO backend (ImageMagick, QuartzImageIO and ImageIO).

There's a plan to include ImageMagick and ImageIO when Julia 1.6 is released. But for now, we have to add it manually. JuliaImages/Images.jl#824 (comment)

@mcabbott
Copy link
Contributor Author

Thanks for the issue, clearly I did not very dig very deep, sorry.

I was originally going to make a PR replacing Images with ImageCore in the readme, to be minimal rather than maximal. But then checked what works on a fresh environment... not sure if this should be made explicit? Or just left to general knowledge & error messages so as not to have to update too many places?

@johnnychen94
Copy link
Member

not sure if this should be made explicit? Or just left to general knowledge & error messages so as not to have to update too many places?

Hmmm, I'm not sure if I understand you correctly. There's a section explaining this in the documentation https://juliaimages.org/stable/install/#sec_imageio but I guess you mean adding some notes in this repo?

@mcabbott
Copy link
Contributor Author

Not a deep issue, my complaint is just that what looks like a stand-alone readme example, doesn't actually run with the packages mentioned. Instead you have to dig into the rest of the ecosystem's documentation. Or fix what the error messages tell you to fix, and try again.

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

2 participants