-
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
IJulia can't display Float64 Gray images? #548
Comments
I think you need ImageMagick. Could you try this -
EDIT - Are you using OS X? |
That works fine. It's this that fails: x, y = imgradients(img)
x |
Whoops. Did not see that. I think its because the gradients can be negative or > 1. You will have to scale the gradients back to [0-1] if you want to view the image. |
Ah. That works for me. What's wrong here? (Also in IJulia) img[1:5, 1:5]
MethodError: no method matching show(::IOContext{Base64EncodePipe}, ::MIME{Symbol("image/png")}, ::Array{ColorTypes.Gray{Float64},2})
Closest candidates are:
show(::IO, !Matched::MIME{Symbol("text/csv")}, ::Any) at datafmt.jl:712
show(::IO, !Matched::MIME{Symbol("text/tab-separated-values")}, ::Any) at datafmt.jl:713
show(::IO, !Matched::MIME{Symbol("text/plain")}, ::AbstractArray{T,N}) at replutil.jl:153
...
in verbose_show(::Base64EncodePipe, ::MIME{Symbol("image/png")}, ::Array{ColorTypes.Gray{Float64},2}) at ./multimedia.jl:50
in base64encode(::Function, ::MIME{Symbol("image/png")}, ::Vararg{Any,N}) at ./base64.jl:160
in display_dict(::Array{ColorTypes.Gray{Float64},2}) at /Users/tamasnagy/.julia/v0.5/IJulia/src/execute_request.jl:31
in execute_request(::ZMQ.Socket, ::IJulia.Msg) at /Users/tamasnagy/.julia/v0.5/IJulia/src/execute_request.jl:195
in eventloop(::ZMQ.Socket) at /Users/tamasnagy/.julia/v0.5/IJulia/src/IJulia.jl:138
in (::IJulia.##25#31)() at ./task.jl:360 |
As you can tell, I don't use IJulia. This should be fixed in #549. With regards to the I'm a bit reluctant to tackle that myself since I don't have a mac to test it on. Moreover, I suspect this part of Images is amenable to simplification now that functions-as-arguments are fast in julia (0.5 and above). Maybe a new goal for #542. |
Display AbstractMatrix{Colorant} in IJulia (fixes #548)
Thanks! I could help with the testing on mac, either with the current Images.jl or with the new shiny version. |
@timholy I guess it will be better if we have a dedicated ImageView package 😄 with the code you had on your local machine. |
Well, there's merit in having IJulia work too. And once the Images rewrite is done, ImageView is on the table. (I've offered to release the makeshift ImagePlayer on a no-guarantees-I-won't-support-this basis, but no takers yet...) I've seen this funky spacing before; perhaps JuliaLang/IJulia.jl#229 has resurfaced? |
I'd be interested to make a |
@timholy should I open an issue over on IJulia? I don't seem to be able to re-open this issue. |
@SimonDanisch, that would be awesome. I want there to be something that works without relying on GL, but I would love to use GL whenever it's available. I am probably going to change the API of ImageView, so I'll answer that question once I get serious about tackling it. Would be fun to work on together! |
Turn off Colors' svg display of color matrices (fixes #548)
The text was updated successfully, but these errors were encountered: