ImageView: display to true resolution

I am using julia v1.0.1 with ImageView v0.8.
If I use imshow(image) with an image given by a 1000x1000 array,
the image is displayed in a 1000x1000 window. Unfortunately, the image is scaled down in order to leave a margin around the image, the bottom left of which is used to display color information for the pixel under the cursor.

How can I display the image at its true resolution (1000x1000 pixels on screen)? Is there a way to remove the margins? Or to tell it to display the image at its native resolution, and then to add the margin?

One option would be to resize after creation:

julia> guidct = imshow(img);

julia> sz = size(guidct["gui"]["frame"])
(1000, 981)

julia> resize!(guidct["gui"]["window"], sz[1], 2*size(img, 1) - sz[2])

julia> size(guidct["gui"]["frame"])
(1000, 1000)

I’d consider a PR to make that the default in ImageView.

Thanks for your answer.

If I compare the result displayed by ImageView with a picture obtained by saving the image and displaying it in some external viewer, the two pictures do not match exactly in size.

It seems that the size of the image displayed by imshow is not equal to the size guidct["gui"]["frame"] of the frame. The frame still includes a short border (and the size of the frame is reported equal to the size of the window after resizing), but I don’t know how to compute its width. Any hint?

Sincerely

Maybe dig into the Gtk properties: https://developer.gnome.org/gtk3/stable/GtkFrame.html. You may have to work your way up the hierarchy to get the info you need.