(shr-rescale-image): Add an :ascent of 100 to images so that the underline comes...
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 31 May 2011 19:36:03 +0000 (21:36 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 31 May 2011 19:36:03 +0000 (21:36 +0200)
lisp/ChangeLog
lisp/shr.el

index 9d141f9..a62ef42 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-rescale-image): Add an :ascent of 100 to images so that
+       the underline comes at the bottom.
+
 2011-05-31  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-registry.el (gnus-registry-article-marks-to-chars): Rename from
index c5506d9..93aa7bc 100644 (file)
@@ -534,7 +534,7 @@ the URL of the image to the kill buffer instead."
   (if (or (not (fboundp 'imagemagick-types))
          (not (get-buffer-window (current-buffer))))
       (create-image data nil t)
-    (let* ((image (create-image data nil t))
+    (let* ((image (create-image data nil t :ascent 100))
           (size (image-size image t))
           (width (car size))
           (height (cdr size))
@@ -553,11 +553,13 @@ the URL of the image to the kill buffer instead."
       (when (> (car size) window-width)
        (setq image (or
                     (create-image data 'imagemagick t
-                                  :width window-width)
+                                  :width window-width
+                                  :ascent 100)
                     image)))
       (when (and (fboundp 'create-animated-image)
                 (eq (image-type data nil t) 'gif))
-       (setq image (create-animated-image data 'gif t)))
+       (setq image (create-animated-image data 'gif t
+                                          :ascent 100)))
       image)))
 
 ;; url-cache-extract autoloads url-cache.