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

gnus-html.el: Try to get the rescaling logic right for images that are just wide and not tall.

parent 075843d3
......@@ -2,6 +2,8 @@
* gnus-html.el (gnus-html-put-image): Use the deleted text as the image
alt text.
(gnus-html-rescale-image): Try to get the rescaling logic right for
images that are just wide and not tall.
* gnus.el (gnus-string-or): Fix the syntax to not use eval or
overshadow variable bindings.
......
......@@ -256,11 +256,14 @@ fit these criteria."
(when (> width window-width)
(setq window-height (truncate (* window-height
(/ (* 1.0 window-width) width)))))
(if (> height window-height)
(or (create-image file 'imagemagick nil
:height window-height)
image)
image))))
(or
(cond ((> height window-height)
(create-image file 'imagemagick nil
:height window-height))
((> width window-width)
(create-image file 'imagemagick nil
:width window-width)))
image))))
(defun gnus-html-prune-cache ()
(let ((total-size 0)
......
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