When I create an image in the repl I get a huge RGB array, but in Jupyterlab I do get the image. I thought the repl also showed images. That is:
using Images, TestImages
img = testimage(“mandrill”)
shows a mandrill in Jupyterlab, but just a huge array in the repl. I prefer to use the repl to learn, since Jupyterlab is cumbersome. Is there a way to have the repl show images?
These image or video in terminal packages are kind of cool, but also so gimmicky. For people not already embedded in terminal centric workflows this could appear like a joke, why would anybody be satisfied with such a pixelated display. Being used to the constrained feature set of terminals, one might think what a cool workaround, I’ll take it!
If you work a lot with images you can place this in your startup.jl file:
using Images, ImageView, ImageIO
function Base.display(img::Array{RGB{Normed{UInt8, 8}}, 2})
display(imshow(img))
end
Next time you work with images in your REPL instead the array you see now a new window will open with the image and the text output will look something like:
Thanks. I’ll have to try that package. There are soooo many options for imaging packages, some of which haven’t worked out, are too complex at my level, or aren’t even there, that I’m lost in the woods. The package system needs some cleaning out
Wish I could try it, but I’m on Windows. I could install Linux but I just don’t have time to re-learn it when I’m full bore on Julia and Math Maybe they’ll come out with a winversion soon.
I find I’m learning faster by fiddling with the terminal, than loading Jupyter, which has a high overhead, and is slower. So I was hoping to see images in the terminal. You can get a pic to load outside the terminal with some packages, but again, I’d rather just load them in the terminal. Julia is a great language to learn but the packages are confusing. There are at least 20 just for imaging.
Julia has a tendency to avoid monolithic do-it-all packages, towards smaller ones that are composed with each other. Often, if there are 20 packages, they are supposed to work together. Not sure about the image ecosystem in particular though to be honest.