-
Notifications
You must be signed in to change notification settings - Fork 143
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
grayim() does not support Float64 gray images in Ijulia? #572
Comments
grayim
does not support Float64 gray images in Ijulia?
I can reproduce this. However, it's probably related to the image display code. If I run from a terminal session I get the same error, but I have Keno's TerminalExtensions.jl set up to display images in my terminal. |
As @rsrock says, the error is triggered when it tries to display the image, not in creating it. Check For the display error, notice that you have some with values < 0. See if |
@timholy I am not familiar with |
Highly recommended: check out "fixed-renaming" from #542 (comment). |
@timholy I checked out the "fixed-renaming" branch following your instruction just now, but it seems I still cannot display the image array consisting negative values. |
On this branch, use the lowercase: |
@timholy Oh I see. Now I tried img = grayim(new_array)
|
Ah, you're on the Mac. I think no one has updated QuartzImageIO yet, unfortunately. (See JuliaIO/QuartzImageIO.jl#28.) Can you delete QuartzImageIO and use ImageMagick? |
@timholy Sure. I deleted QuartzImageIO, and ran Then I ran
I also tried to use colorview(Gray, new_array)
|
Wow, sorry this is so hard. This is what happens for me on Linux: Obviously, I didn't have to do any clamping or anything. Without a Mac, this is a little hard for me to debug. I'm not quite sure why |
I think that's the trick (IIRC). |
@timholy Unfortunately, it does not work if I say |
I didn't use |
@timholy I also noticed that after checking out "fixed-renaming" branch,
|
@timholy Oh it's my bad.
|
Regarding those warnings: the new branches redesign a lot of code, and those warnings are encouraging you to use the new functions/function names. Collectively, the functionality should be equal to or better than the old code, it just may be organized differently that you are used to. |
@timholy I deleted all the lines mentioning |
OK, this seems to be the fundamental problem, one that might have been the issue from the beginning. (Sorry if this has been a wild good chase.) I'm not sure where that error comes from, but does |
@timholy Wow it might be I run
|
I can reproduce the original problem and the ImageMagick Test failures on my Macbook (0.5 on fixed-renaming) |
Does this help anyone: https://github.com/JuliaIO/ImageMagick.jl#troubleshooting |
I think my macbook uses the system's imagemagick. That could easily be the issue. I'm afraid I can't confirm that this causes the issue because I need it this way for other purposes |
I installed ImageMagick.jl again using Homebrew.jl. Now besides the system-wide ImageMagick, there is one copy on Julia's path:
However, it still fails the tests on Jupyter. |
Rats. I'm not that familiar with OSX, but the fact that the lib was found seems promising. Are the errors the same as above ("no encode delegate...")? Don't know if any of these help, but...(in chronological order): Other than that, the only thing I can think of is to uninstall ImageMagick and go back to trying to get QuartzImageIO working. You might revert to the |
i recently pushed a commit to ImageMagick/master that makes the OS X install easier. it has not been rebased to images-next yet. on a fresh install on OS X 10.11.6, julia 0.5 i get no testing errors: Pkg.clone("ImageMagick")
Pkg.checkout("ImageMagick")
Pkg.build("ImageMagick")
Pkg.test("ImageMagick") this is in bash REPL, not Jupyter. |
@timholy The problem is solved. JuliaIO/ImageMagick.jl#23 is very helpful. using Homebrew
Homebrew.rm("imagemagick")
Homebrew.update()
Homebrew.add("imagemagick")
Pkg.build("ImageMagick") Then on Jupyter, Thanks everyone for helping me fix this issue! |
Yay, glad to hear that! Thanks for your patience. I'd begun to wonder if I needed to write a PNG library in pure julia... |
This issue might relates to #548.
In Julia 0.5,
In Ijulia on Jupyter notebook:
I got the following error:
I am wondering is there a way to construct a Float64 gray image on Ijulia using Images.jl?
The text was updated successfully, but these errors were encountered: