Ubuntu – GNOME Image Viewer opens its window 2 pixels shorter and distorts the image by resampling

14.04image-viewersunity

Since installing Ubuntu 14.04 (not sure if the problem was in older versions) I noticed that GNOME Image Viewer opens images in a window which is 2 pixels shorter than it needs to be to show the image properly without resampling – pixel to pixel. To fit the image the Image Viewer resamples and resizes it down. The result is very annoying on screenshots because there I see blurred text which is caused by the image worthless downsampling.

Demonstration

Note: To see the demonstration images properly there must not be any resizing at your side – in browser (e.g. in Firefox press Ctrl+0) on your whole desktop etc.

I have created a testing pixel checkerboard pattern with fields 1×1 pixel. The testing image size is 600×400 pixels. Below you see the image opened in Image Viewer. Notice the artefacts caused by downsampling by two pixels and the thin black borders on the sides.
default view

$ xwininfo 
...
xwininfo: Window id: 0x4e00007 "checkerboard-1x1px_600x400.png"
...
  Width: 600
  Height: 467
...
  Corners:  +49+112  -4151+112  -4151-1041  +49-1041
  -geometry 600x467+39+74

Workarounds

After resizing the window vertically to add two pixels you see that the image is displayed correctly pixel to pixel without any resizing artefacts or black borders on the sides.
after resizing

$ xwininfo 
...
xwininfo: Window id: 0x4e00007 "checkerboard-1x1px_600x400.png"
...
  Width: 600
  Height: 469
...
  Corners:  +49+112  -4151+112  -4151-1039  +49-1039
  -geometry 600x469+39+74

Another (easier) workaround is to use the View > Normal Size function (Ctrl+0) but unfortunately the window will not resize and the two vertical and some horizontal pixels (covered by the scrollbar) at the border of the image will be cut off.
after applying normal sizeenter code here

Questions

Could there be something in my configuration causing this problem? Is this bug known and reported? I have not found it. Are there any other solutions for the problem?

The testing image is here.

Best Answer

That's a known bug in eog (= Eye Of Gnome, = Gnome Image Viewer)

Look at the Launchpad bug tracker and subscribe to the bug tracking list and add your excellent description.

Related Question