# Image not showing in IJulia

**URL:** <https://discourse.julialang.org/t/image-not-showing-in-ijulia/58400>\
**Category:** New to Julia\
**Tags:** jupyter, ijulia\
**Created:** [April 1, 2021, 10:20pm UTC](https://discourse.julialang.org/t/image-not-showing-in-ijulia/58400 "2021-04-01T22:20:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathan-durbin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonathan-durbin/32/11468_2.png) [@jonathan-durbin](https://discourse.julialang.org/u/jonathan-durbin)\
**Post date:** [April 1, 2021, 10:20pm UTC](https://discourse.julialang.org/t/image-not-showing-in-ijulia/58400/1 "2021-04-01T22:20:02Z")

</div>

When I run the example code from the [Images Documentation](https://juliaimages.org/stable/tutorials/quickstart/) `img = Array(reshape(range(0,stop=1,length=10^4), 100, 100))` in a Julia (Jupyter) notebook, I only see the raw output (below), not the image itself. This issue must have such a simple fix, but I can’t seem to find it.

Output from the above:

```julia
100×100 Matrix{Float64}:
 0.0 0.010001 0.020002 0.030003 … 0.970097 0.980098 0.990099
 0.00010001 0.010101 0.020102 0.030103 0.970197 0.980198 0.990199
 0.00020002 0.010201 0.020202 0.030203 0.970297 0.980298 0.990299
*extra lines removed*

```

Potentially helpful information:

```julia
julia> using Pkg, Dates

julia> today()
2021-04-01

julia> versioninfo()
Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-1035G4 CPU @ 1.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, icelake-client)

julia> Pkg.status()
      Status `C:\Users\Jon\.julia\environments\v1.6\Project.toml`
  [5789e2e9] FileIO v1.6.5
  [7073ff75] IJulia v1.23.2
  [82e4d734] ImageIO v0.5.3
  [6218d12a] ImageMagick v1.2.0
  [916415d5] Images v0.23.3
  [5e47fb64] TestImages v1.4.0

```

---

<div class="post-metadata">

**Author:** ![magister-ludi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/magister-ludi/32/4003_2.png) [@magister-ludi](https://discourse.julialang.org/u/magister-ludi)\
**Post date:** [April 1, 2021, 10:56pm UTC](https://discourse.julialang.org/t/image-not-showing-in-ijulia/58400/2 "2021-04-01T22:56:34Z")

</div>

You are right. The image would be constructed by converting the array to a `Matrix` of `Colorant` values. The step provided:

```julia
julia> img = rand(4, 3)
4×3 Array{Float64,2}:
 0.294863 0.603624 0.113032
 0.696311 0.0443766 0.670174
 0.332355 0.915681 0.140473
 0.415085 0.372323 0.0813266

```

should have the additional line

```julia
julia> Gray.(image)

```

to produce the image output.  
I suspect the documentation hasn’t been updated (this is something that is probably quite old). Maybe make a documentation PR?

---

<div class="post-metadata">

**Author:** ![magister-ludi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/magister-ludi/32/4003_2.png) [@magister-ludi](https://discourse.julialang.org/u/magister-ludi)\
**Post date:** [April 2, 2021, 12:03am UTC](https://discourse.julialang.org/t/image-not-showing-in-ijulia/58400/3 "2021-04-02T00:03:54Z")

</div>

Another one line option would be

```julia
img = rand(Gray, 4, 3)

```

which avoids constructing an intermediate array. This is done later in the same tutorial.
