-
Notifications
You must be signed in to change notification settings - Fork 26
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
add ImageMagick dependency? #36
Comments
QuartzImageIO is used by default on OSX, so making it part of the required packages is not without issues. FileIO used to offer to install ImageMagick for you, but that was deemed too magical. (I can understand why.) |
Ah I see. I ran into this when testing using TestImages on Travis. It sounds like rather than adding |
Given that it shows an informative error about how to fix the problem, do we actually need to do anything? Yes I'm being lazy, but it's laziness with a purpose 😄. If we do nothing then FileIO is in charge of deciding who should load images; if a new package comes on line (e.g., https://github.com/c42f/OpenImageIO.jl) then FileIO is the one-and-only thing that needs updating. If we add things to the build script here then there is more stuff to change. |
This makes sense. I wasn't very clear in my post, I was trying to decide on the best practice when testing a package that depends on TestImages. Because currently adding TestImages as a dependency will cause a failure on Travis unless ImageMagick is also a dependency. Since we wouldn't just want to install ImageMagick unconditionally, I thought to edit the build script to install it conditionally in this dependent package I'm working on. Does that sound reasonable? |
Got it, sorry, you were pretty clear and I was just being dense. How about this:
|
bump. I just installed this package and tried julia> using Images, TestImages, ImageInTerminal
[ Info: Precompiling Images [916415d5-f1e6-5110-898d-aaa5f9f070e0]
[ Info: Precompiling TestImages [5e47fb64-e119-507b-a336-dd2b206d9990]
[ Info: Precompiling ImageInTerminal [d8c32880-2388-543b-8c61-d9f865259254]
julia> testimage("cameraman")
Error encountered while loading "C:\\Users\\Mus\\.julia\\packages\\TestImages\\6bT9D\\images\\cameraman.tif".
Fatal error:
ERROR: ArgumentError: Package ImageMagick not found in current path:
- Run `import Pkg; Pkg.add("ImageMagick")` to install the ImageMagick package.
|
Given the cross-platform difficulties described above I was convinced not to add ImageMagick as a dependency. My followup question (how to add TestImages as test dependency of another package) was also answered, though I never got the chance to test whether that solution works on all platforms. I probably should have closed the issue, but if others are still unsatisfied I'll leave it open. |
@timholy can you find any reference to this? Also I've drafted a related PR in FileIO JuliaIO/FileIO.jl#226. But I'm not sure if we really need this one. |
🤔 Looks like we still can't solve the platform-dependent package deps using the new My current workaround is to add both |
This has been fixed if you use Julia 1.3 or higher. |
It seems ImageMagick is a test dependency but not a project dependency, leading to this failure on Julia 0.7:
I think we just need to add ImageMagick to REQUIRE, I'll ready a PR.
The text was updated successfully, but these errors were encountered: