-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Gray image can not be displayed as an true image #588
Comments
Hmm this is tricky. The type from grayim is a subset of AbstractArray{Float64,2}... not the same as if you loaded it from a file. In order to define a recipe that would work, I'd have to add a dependency on Images (which I don't want). Another option would be to add the recipe to Images itself, which would require a dependency on RecipesBase (cc @timholy) The current workaround is to explicitly map this to a matrix of colors: using Plots, Images
img = convert(Matrix{Gray}, grayim(rand(16,16)))
plot(img) |
In the "new Images" (see JuliaImages/Images.jl#542, especially JuliaImages/Images.jl#542 (comment)) it will return something of type |
@timholy do you mean that with the new Images the |
Well, |
But yes, nothing you need to do here. |
Cool... gonna close this then. Thanks! |
Take a look at the following toy example:
It seems that Plots considered the gray image as a common matrix. However, other image types can be displayed correctly. I guess this might due to the data structure of the gray image which is indeed a plain Matrix.
The text was updated successfully, but these errors were encountered: