# ImageView.imshow() crashes when playing with contrast values and crashing the REPL

**URL:** <https://discourse.julialang.org/t/imageview-imshow-crashes-when-playing-with-contrast-values-and-crashing-the-repl/115236>\
**Category:** New to Julia\
**Tags:** images\
**Created:** [June 5, 2024, 3:08pm UTC](https://discourse.julialang.org/t/imageview-imshow-crashes-when-playing-with-contrast-values-and-crashing-the-repl/115236 "2024-06-05T15:08:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mend-Amar\_Badral](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mend-amar_badral/32/219656_2.png) [@Mend-Amar\_Badral](https://discourse.julialang.org/u/Mend-Amar_Badral)\
**Post date:** [June 5, 2024, 3:08pm UTC](https://discourse.julialang.org/t/imageview-imshow-crashes-when-playing-with-contrast-values-and-crashing-the-repl/115236/1 "2024-06-05T15:08:31Z")

</div>

I’ve been trying to use the ImageView.jl package for viewing images from TestImages.jl package to see and playing around with the contrast slider.Specifically I used mri-stack.tif image. I think it has some bugs and issues with it. For example when I execute following code in the REPL:

```julia
julia> using ImageView, TestImages

julia> dct = testimage("mri-stack.tif")

julia> imshow(dct)

```

it launches the imageview window fine…  
 ![Issue1](https://global.discourse-cdn.com/julialang/original/3X/0/a/0aa8ea1897b95a7eb43d4c0e4a46d0703ff67bef.png)  
But after playing with the contrast values, my computer’s performance significantly slows down and…

 ![Issue2](https://global.discourse-cdn.com/julialang/original/3X/2/1/21b680c6ee96e662c095f80153f9a561e30ad56f.png)  
finally succumbs to a crashing the ImageView window and REPL with it.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/b/4bdf6c35dd5a19e1081361917cd339dff1fbe380.png)  
My question is that is anybody can recreate this issue? And what other alternatives there are to ImageView.jl? I heard that Makie.jl is quite capable?

---

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [June 10, 2024, 6:04am UTC](https://discourse.julialang.org/t/imageview-imshow-crashes-when-playing-with-contrast-values-and-crashing-the-repl/115236/2 "2024-06-10T06:04:57Z")

</div>

Welcome to Julia Discourse, and sorry for the late reply.

This problem could be reproduced on my Windows machine with ImageView.jl v0.12.3 (\< v0.12.4).

xref: [Infinite loop when bars cross in contrast GUI · Issue #308 · JuliaImages/ImageView.jl · GitHub](https://github.com/JuliaImages/ImageView.jl/issues/308)

---

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [June 10, 2024, 10:32am UTC](https://discourse.julialang.org/t/imageview-imshow-crashes-when-playing-with-contrast-values-and-crashing-the-repl/115236/4 "2024-06-10T10:32:48Z")

</div>

cf: [Improper `Normed` handling in the contrast GUI · Issue #310 · JuliaImages/ImageView.jl · GitHub](https://github.com/JuliaImages/ImageView.jl/issues/310)

---

<div class="post-metadata">

**Author:** ![Mend-Amar\_Badral](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mend-amar_badral/32/219656_2.png) [@Mend-Amar\_Badral](https://discourse.julialang.org/u/Mend-Amar_Badral)\
**Post date:** [June 15, 2024, 4:34am UTC](https://discourse.julialang.org/t/imageview-imshow-crashes-when-playing-with-contrast-values-and-crashing-the-repl/115236/5 "2024-06-15T04:34:04Z")

</div>

So does this mean that ImageView v0.12.5 fixed this issue? How to update to the latest version? When I run in the repl:  
`(@v1.10) pkg> update ImageView;`  
it remains at the version  
`(@v1.10) pkg> st [86fae568] ImageView v0.12.1 `

---

<div class="post-metadata">

**Author:** ![Mend-Amar\_Badral](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mend-amar_badral/32/219656_2.png) [@Mend-Amar\_Badral](https://discourse.julialang.org/u/Mend-Amar_Badral)\
**Post date:** [June 15, 2024, 4:52am UTC](https://discourse.julialang.org/t/imageview-imshow-crashes-when-playing-with-contrast-values-and-crashing-the-repl/115236/6 "2024-06-15T04:52:49Z")

</div>

I have managed to install the latest version 0.12.5 by running the command which I got from of ChatGPT:

```julia
using Pkg;
Pkg.add(PackageSpec(name="ImageView", version="0.12.5"));

```

After that I can confirm that the issue has been resolved. Thank you @kimikage!
