When viewing a large image full size and scrolling, for instance, to
the lower right corner, then selecting a much smaller image in the
thumbnail buffer, the window stays scrolled so the new image is out of
the window. One must scroll back to the "origin" to view the new
displayed image, or just kill the image-dired-display-image buffer and
try again. This fixes the issue.
* lisp/image-dired.el (image-dired-display-window-width):
(image-dired-display-window-height): Operate on a window as argument.
(image-dired-display-image): Bind (image-dired-display-window) and use
it. Set window vscroll and hscroll to zero when refreshing the
buffer's contents.