From: Benjamin Riefenstahl Date: Mon, 14 Jan 2019 22:37:03 +0000 (+0100) Subject: image-mode: Do not use default scaling (bug#33990) X-Git-Tag: emacs-26.1.92~49 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68e55a0;p=emacs.git image-mode: Do not use default scaling (bug#33990) * lisp/image-mode.el (image-toggle-display-image): Set :scale == 1 so that create-image does not apply additional scaling. --- diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 7dfa691065c..3666009c7e0 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -761,9 +761,11 @@ was inserted." (type (if (fboundp 'imagemagick-types) 'imagemagick (image-type file-or-data nil data-p))) + ;; :scale 1: If we do not set this, create-image will apply + ;; default scaling based on font size. (image (if (not edges) - (create-image file-or-data type data-p) - (create-image file-or-data type data-p + (create-image file-or-data type data-p :scale 1) + (create-image file-or-data type data-p :scale 1 :max-width (- (nth 2 edges) (nth 0 edges)) :max-height (- (nth 3 edges) (nth 1 edges))))) (inhibit-read-only t)