Function: image--compute-rotation
image--compute-rotation is a byte-compiled function defined in
image.el.gz.
Signature
(image--compute-rotation IMAGE)
Documentation
Return the current rotation of IMAGE, or 0 if no rotation.
Also return nil if rotation is not a multiples of 90 degrees (0, 90,
180[-180] and 270[-90]).
Source Code
;; Defined in /usr/src/emacs/lisp/image.el.gz
(defsubst image--compute-rotation (image)
"Return the current rotation of IMAGE, or 0 if no rotation.
Also return nil if rotation is not a multiples of 90 degrees (0, 90,
180[-180] and 270[-90])."
(let ((degrees (or (image-property image :rotation) 0)))
(and (= 0 (mod degrees 1))
(car (memql (truncate (mod degrees 360)) '(0 90 180 270))))))