JuliaImages / ImageView.jl

Interactive display of images and movies
MIT License
136 stars 32 forks source link

Mouse zooming and panning feature lost after running imshow!() #242

Closed golamrabbani268 closed 3 years ago

golamrabbani268 commented 3 years ago

I am trying to create an interface that allows the user to move through different images automatically in the same window so am using imshow!(GUIdict["gui"]["canvas"], GtkReactive.Signal(imgs2[:,:,1])) where GUIdict is assigned as imshow(imgs) when opening the first image. However, after running imshow!(...), the zooming feature using the mouse does not work. How can I enable the zoom feature after running imshow!(...)?

timholy commented 3 years ago

I'd need a reproducible example to try it myself, but in general terms the most likely culprit is garbage-collection. Read https://juliagizmos.github.io/GtkReactive.jl/stable/#Concepts-1

golamrabbani268 commented 3 years ago

@timholy thanks for the link. Managed to solve my problem using that. Was following an outdated version of the guide and so had set_coords instead of set_coordinates.