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.
This commit is contained in:
Benjamin Riefenstahl 2019-01-14 23:37:03 +01:00 committed by Eli Zaretskii
parent b6c762a520
commit 68e55a0bfc

View file

@ -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)