Commit e5e2587e authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen Committed by Katsumi Yamaoka
Browse files

gnus-html.el: We can't rescale if we don't have the article buffer in a window.

parent 1ee093a3
......@@ -243,11 +243,12 @@ fit these criteria."
nil)))))
(defun gnus-html-rescale-image (image)
(if (not (fboundp 'imagemagick-types))
(if (or (not (fboundp 'imagemagick-types))
(not (get-buffer-window (current-buffer))))
image
(let* ((width (car (image-size image t)))
(height (cdr (image-size image t)))
(edges (window-pixel-edges))
(edges (window-pixel-edges (get-buffer-window (current-buffer))))
(window-width (truncate (* gnus-max-image-proportion
(- (nth 2 edges) (nth 0 edges)))))
(window-height (truncate (* gnus-max-image-proportion
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment