# Showing Image in Juno image pane in real time

**URL:** <https://discourse.julialang.org/t/showing-image-in-juno-image-pane-in-real-time/83031>\
**Category:** Juno\
**Tags:** images\
**Created:** [June 19, 2022, 10:10pm UTC](https://discourse.julialang.org/t/showing-image-in-juno-image-pane-in-real-time/83031 "2022-06-19T22:10:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NatMath](https://avatars.discourse-cdn.com/v4/letter/n/4491bb/32.png) [@NatMath](https://discourse.julialang.org/u/NatMath)\
**Post date:** [June 19, 2022, 10:10pm UTC](https://discourse.julialang.org/t/showing-image-in-juno-image-pane-in-real-time/83031/1 "2022-06-19T22:10:37Z")

</div>

I am working on a toy raytracer program and I would like to be able to show partial renders while the image is being rendered, ie. showing the current state of the image every n iteration of the main loop. However, I am not able to show images in Juno in real time. I know that returning a matrix of RGB from a function will show it as an image but this is not what I want. `show(img)` doesn’t seem to work as it simply outputs it as text in the console. `ImageShow.gif([img])` kind of works but the quality is awful. Other than that, I haven’t been able to find how to use `ImageShow`.

---

<div class="post-metadata">

**Author:** ![Deanodirector](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/deanodirector/32/37411_2.png) [@Deanodirector](https://discourse.julialang.org/u/Deanodirector)\
**Post date:** [June 24, 2022, 12:07am UTC](https://discourse.julialang.org/t/showing-image-in-juno-image-pane-in-real-time/83031/2 "2022-06-24T00:07:39Z")

</div>

hello, i am having the same issue. The first tutorial on julia images keeps saying ‘images are just arrays’ but I can’t find a simple way to output one.

ddi you have any success. I just want some kind of function like

showimage( matrix{3xwidthxheight})

---

<div class="post-metadata">

**Author:** ![JohnnyChen94](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnnychen94/32/29979_2.png) [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Post date:** [June 24, 2022, 5:22am UTC](https://discourse.julialang.org/t/showing-image-in-juno-image-pane-in-real-time/83031/3 "2022-06-24T05:22:04Z")

</div>

“images are just arrays” means any image is an array of a colorant type.

```julia
julia> img = rand(RGB, 5, 5) # Matrix{RGB{Float64}}

```

and if you’re in IDE that supports image display, you get a good-looking result. Here’s what I get in vscode

![image](https://global.discourse-cdn.com/julialang/original/3X/d/b/db9b5afd41b5d97cf6a1b692f00e13ecbebc54cb.png)

This is a bit different from what you’re used to in other image processing frameworks, where people typically uses raw numerical array.

To convert a 3x5x5 array to a colorant array:

```julia
colorview(RGB, rand(3, 5, 5))

```

---

<div class="post-metadata">

**Author:** ![JohnnyChen94](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnnychen94/32/29979_2.png) [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Post date:** [June 24, 2022, 5:23am UTC](https://discourse.julialang.org/t/showing-image-in-juno-image-pane-in-real-time/83031/4 "2022-06-24T05:23:39Z")

</div>

You might want to explicitly call `display(img)` for every few iterations. Sometimes a `sleep(0.01)` before `display(img)` helps flush the display panel.

---

<div class="post-metadata">

**Author:** ![Deanodirector](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/deanodirector/32/37411_2.png) [@Deanodirector](https://discourse.julialang.org/u/Deanodirector)\
**Post date:** [June 24, 2022, 8:57pm UTC](https://discourse.julialang.org/t/showing-image-in-juno-image-pane-in-real-time/83031/5 "2022-06-24T20:57:20Z")

</div>

fantastic! this is exactly what I needed. thank you so much. I think it was this special ‘colorant’ type that i didn’t understand

---

<div class="post-metadata">

**Author:** ![JohnnyChen94](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnnychen94/32/29979_2.png) [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Post date:** [June 25, 2022, 1:50am UTC](https://discourse.julialang.org/t/showing-image-in-juno-image-pane-in-real-time/83031/6 "2022-06-25T01:50:38Z")

</div>

Hope you enjoy JuliaImages 😆

Because I don’t check discourse very often, please feel free to ping me if you want help. You can also open issues (or discussions) on GitHub or use the `#image-processing` channel on slack.
