From 68e55a0bfc15d6b39ae7aa5650f375ff6784246d Mon Sep 17 00:00:00 2001 From: Benjamin Riefenstahl Date: Mon, 14 Jan 2019 23:37:03 +0100 Subject: [PATCH] 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. --- lisp/image-mode.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.39.5