Commit 977f9325 authored by Wolfgang Jenkner's avatar Wolfgang Jenkner
Browse files

lisp/image-mode.el (image-transform-check-size): Use assertions only

for images of type imagemagick.

Otherwise no error, image-transform-fit-to-{width,height} is
silently ignored, as before.  Doc fix.
parent 0d4bb04f
2012-11-23 Wolfgang Jenkner <wjenkner@inode.at>
* image-mode.el (image-transform-check-size): Use assertions only
for images of type imagemagick.
Otherwise no error, image-transform-fit-to-{width,height} is
silently ignored, as before. Doc fix.
2012-11-23 Chong Yidong <cyd@gnu.org> 2012-11-23 Chong Yidong <cyd@gnu.org>
   
* faces.el (color-defined-p): Doc fix (Bug#12853). * faces.el (color-defined-p): Doc fix (Bug#12853).
......
...@@ -746,8 +746,14 @@ close to a multiple of 90, see `image-transform-right-angle-fudge'." ...@@ -746,8 +746,14 @@ close to a multiple of 90, see `image-transform-right-angle-fudge'."
h))))) h)))))
(defun image-transform-check-size () (defun image-transform-check-size ()
"Check that the image exactly fits the width/height of the window." "Check that the image exactly fits the width/height of the window.
(unless (numberp image-transform-resize)
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))) (let ((size (image-display-size (image-get-display-property) t)))
(cond ((eq image-transform-resize 'fit-width) (cond ((eq image-transform-resize 'fit-width)
(cl-assert (= (car size) (cl-assert (= (car size)
......
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