Function: image-transform-fill-window

image-transform-fill-window is an interactive and byte-compiled function defined in image-mode.el.gz.

Signature

(image-transform-fill-window)

Documentation

Fill the window with the image while keeping image proportions.

This means filling the window with the image as much as possible without leaving empty space around image edges. Then you can use either horizontal or vertical scrolling to see the remaining parts of the image.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defun image-transform-fill-window ()
  "Fill the window with the image while keeping image proportions.
This means filling the window with the image as much as possible
without leaving empty space around image edges.  Then you can use
either horizontal or vertical scrolling to see the remaining parts
of the image."
  (interactive nil image-mode)
  (let ((size (image-display-size (image-get-display-property) t)))
    (setq image-transform-resize
          (if (> (car size) (cdr size)) 'fit-height 'fit-width)))
  (image-toggle-display-image))