Function: gnus-html-maximum-image-size

gnus-html-maximum-image-size is a byte-compiled function defined in gnus-html.el.gz.

Signature

(gnus-html-maximum-image-size)

Documentation

Return the maximum size of an image according to gnus-max-image-proportion.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-html.el.gz
(defun gnus-html-maximum-image-size ()
  "Return the maximum size of an image according to `gnus-max-image-proportion'."
  (let ((edges (window-inside-pixel-edges
                (get-buffer-window (current-buffer)))))
    ;; (width . height)
    (cons
     ;; Aimed width
     (truncate
      (* gnus-max-image-proportion
         (- (nth 2 edges) (nth 0 edges))))
     ;; Aimed height
     (truncate (* gnus-max-image-proportion
                  (- (nth 3 edges) (nth 1 edges)))))))