# Problem displaying images with ImageView and Gtk/GtkReactive

**URL:** <https://discourse.julialang.org/t/problem-displaying-images-with-imageview-and-gtk-gtkreactive/92507>\
**Category:** Visualization\
**Created:** [January 4, 2023, 1:14pm UTC](https://discourse.julialang.org/t/problem-displaying-images-with-imageview-and-gtk-gtkreactive/92507 "2023-01-04T13:14:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harven](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@harven](https://discourse.julialang.org/u/harven)\
**Post date:** [January 4, 2023, 1:14pm UTC](https://discourse.julialang.org/t/problem-displaying-images-with-imageview-and-gtk-gtkreactive/92507/1 "2023-01-04T13:14:59Z")

</div>

I have a problem using GtkReactive and Gtk.

```
> using Images, ImageView
> imshow([1 1 ; 1 1])

```

gives a small black square. If now I load GtkReactive and Gtk,

```
> using GtkReactive, Gtk
> imshow([1 1 ; 1 1])

```

I get a blank window and the following error.

```
┌ Warning: Error in @guarded callback
│ exception =
│ MethodError: copy!(::GtkCanvas, ::MappedArrays.ReadonlyMappedArray{Gray{N0f8}, 2, SubArray{Int64, 2, MappedArrays.ReadonlyMappedArray{Int64, 2, Matrix{Int64}, typeof(identity)}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false}, ImageCore.var"#25#26"{Gray{N0f8}, ImageCore.var"#23#24"{N0f8, RoundingIntegers.RInt64, RoundingIntegers.RInt64}}}) is ambiguous. Candidates:
│ copy!(c::Union{GtkCanvas, GtkObservables.Canvas}, img) in GtkObservables at /home/yves/.julia/packages/GtkObservables/u6z6P/src/graphics_interaction.jl:323
│ copy!(c::Union{GtkCanvas, GtkReactive.Canvas}, img) in GtkReactive at /home/yves/.julia/packages/GtkReactive/xG9GL/src/graphics_interaction.jl:308
│ Possible fix, define
│ copy!(::GtkCanvas, ::Any)

```

The previous code used to work some times ago.  
Where does the error come from and is there a workaround?

I am using julia 1.8.4 and the latest version of the following packages:  
ImageView v0.11.2, Images v0.25.2, Gtk v1.3.0, GtkReactive v1.0.6.

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [January 4, 2023, 9:21pm UTC](https://discourse.julialang.org/t/problem-displaying-images-with-imageview-and-gtk-gtkreactive/92507/2 "2023-01-04T21:21:44Z")

</div>

Don’t load GtkReactive, just use GtkObservables. ImageView got rewritten to use GtkObservables instead of GtkReactive.
