emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101274: gnus-html.el: Try to get the


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101274: gnus-html.el: Try to get the rescaling logic right for images that are just wide and not tall.
Date: Thu, 02 Sep 2010 00:08:22 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101274
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2010-09-02 00:08:22 +0000
message:
  gnus-html.el: Try to get the rescaling logic right for images that are just 
wide and not tall.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-html.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-09-02 00:03:57 +0000
+++ b/lisp/gnus/ChangeLog       2010-09-02 00:08:22 +0000
@@ -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.

=== modified file 'lisp/gnus/gnus-html.el'
--- a/lisp/gnus/gnus-html.el    2010-09-02 00:03:57 +0000
+++ b/lisp/gnus/gnus-html.el    2010-09-02 00:08:22 +0000
@@ -256,11 +256,14 @@
       (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]