Function: image--default-smoothing
image--default-smoothing is a byte-compiled function defined in
image.el.gz.
Signature
(image--default-smoothing IMAGE)
Documentation
Say whether IMAGE should be smoothed when transformed.
Source Code
;; Defined in /usr/src/emacs/lisp/image.el.gz
(defun image--default-smoothing (image)
"Say whether IMAGE should be smoothed when transformed."
(let* ((props (nthcdr 5 image))
(scaling (plist-get props :scale))
(rotation (plist-get props :rotation)))
(cond
;; We always smooth when scaling down and small upwards scaling.
((and scaling (< scaling 2))
t)
;; Smooth when doing non-90-degree rotation
((and rotation
(or (not (zerop (mod rotation 1)))
(not (zerop (% (truncate rotation) 90)))))
t)
(t nil))))