summaryrefslogtreecommitdiff
path: root/lisp/image-mode.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-11-23 17:57:09 -0800
committerGlenn Morris <rgm@gnu.org>2012-11-23 17:57:09 -0800
commitd125ca15f3751f36a1ec49e3d9f9de1735b43698 (patch)
tree5d2764d6a135cdd7d664c8c43f915a14932cd94c /lisp/image-mode.el
parent678a34f4f8e93b8c43e5cdfba423189f4767e5c5 (diff)
parent6d4e8f62e93b575a1da2cd2b4abeb9dce56e1e52 (diff)
downloademacs-d125ca15f3751f36a1ec49e3d9f9de1735b43698.tar.gz
Merge from emacs-24; up to 2012-11-19T11:36:02Z!yamaoka@jpl.org
Diffstat (limited to 'lisp/image-mode.el')
-rw-r--r--lisp/image-mode.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 4ac62fbb6fc..0e91567a29a 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -746,8 +746,14 @@ close to a multiple of 90, see `image-transform-right-angle-fudge'."
h)))))
(defun image-transform-check-size ()
- "Check that the image exactly fits the width/height of the window."
- (unless (numberp image-transform-resize)
+ "Check that the image exactly fits the width/height of the window.
+
+Do this for an image of type `imagemagick' to make sure that the
+elisp code matches the way ImageMagick computes the bounding box
+of a rotated image."
+ (when (and (not (numberp image-transform-resize))
+ (boundp 'image-type)
+ (eq image-type 'imagemagick))
(let ((size (image-display-size (image-get-display-property) t)))
(cond ((eq image-transform-resize 'fit-width)
(cl-assert (= (car size)