Function: image--current-scaling
image--current-scaling is a byte-compiled function defined in
image.el.gz.
Signature
(image--current-scaling IMAGE NEW-IMAGE)
Source Code
;; Defined in /usr/src/emacs/lisp/image.el.gz
(defun image--current-scaling (image new-image)
;; The image may be scaled due to many reasons (:scale, :max-width,
;; etc), so find out what the current scaling is based on the
;; original image size and the displayed size.
(let ((image-width (car (image-size new-image t)))
(display-width (car (image-size image t))))
(/ (float display-width) image-width)))