Function: image-toggle-display

image-toggle-display is an interactive and byte-compiled function defined in image-mode.el.gz.

Signature

(image-toggle-display)

Documentation

Toggle between image and text display.

If the current buffer is displaying an image file as an image, call image-mode-as-text to switch to text or hex display. Otherwise, display the image by calling image-mode.

View in manual

Probably introduced at or before Emacs version 23.2.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defun image-toggle-display ()
  "Toggle between image and text display.

If the current buffer is displaying an image file as an image,
call `image-mode-as-text' to switch to text or hex display.
Otherwise, display the image by calling `image-mode'."
  (interactive)
  (cond ((image-get-display-property) ; in `image-mode'
         (image-mode-as-text))
        ((eq major-mode 'hexl-mode)
         (hexl-mode-exit))
        ((image-mode))))