mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 13:27:36 +00:00
Fix invalid image rotations
* lisp/image.el (image-rotate): Limit rotation to 360 degrees.
This commit is contained in:
parent
f345fdd7e6
commit
8d73c252be
1 changed files with 5 additions and 1 deletions
|
|
@ -1013,7 +1013,11 @@ default is 20%."
|
|||
(interactive)
|
||||
(let ((image (image--get-imagemagick-and-warn)))
|
||||
(plist-put (cdr image) :rotation
|
||||
(float (+ (or (plist-get (cdr image) :rotation) 0) 90)))))
|
||||
(float (mod (+ (or (plist-get (cdr image) :rotation) 0) 90)
|
||||
;; We don't want to exceed 360 degrees
|
||||
;; rotation, because it's not seen as valid
|
||||
;; in exif data.
|
||||
360)))))
|
||||
|
||||
(defun image-save ()
|
||||
"Save the image under point."
|
||||
|
|
|
|||
Loading…
Reference in a new issue