GNU bug report logs - #74725
31.0.50; image-scaling-factor is ignored by create-image

Previous Next

Package: emacs;

Reported by: David Ponce <da_vid <at> orange.fr>

Date: Sat, 7 Dec 2024 12:15:02 UTC

Severity: normal

Found in version 31.0.50

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: David Ponce <da_vid <at> orange.fr>
To: 74725 <at> debbugs.gnu.org
Subject: bug#74725: 31.0.50; image-scaling-factor is ignored by create-image
Date: Sat, 7 Dec 2024 13:41:37 +0100
Hello,

After more investigation I found the issue is not in image.el, but is due
to image caching.

If I flush the image cache when I change the value of `image-scaling-factor'
the result is as expected:

(let* ((image-scaling-factor 2.0)
       (image (find-image '((:file "icons/hicolor/scalable/apps/emacs.svg")))))
  (image-flush image t)
  (image-size
   (find-image '((:file "icons/hicolor/scalable/apps/emacs.svg")))
   t))
(96 . 96)

;; Image is used from cache, size is not updated.
(let* ((image-scaling-factor 3.0)
       (image (find-image '((:file "icons/hicolor/scalable/apps/emacs.svg")))))
  ;; (image-flush image t)
  (image-size
   (find-image '((:file "icons/hicolor/scalable/apps/emacs.svg")))
   t))
(96 . 96)

;; Image not in cache, size is updated.
(let* ((image-scaling-factor 3.0)
       (image (find-image '((:file "icons/hicolor/scalable/apps/emacs.svg")))))
  (image-flush image t)
  (image-size
   (find-image '((:file "icons/hicolor/scalable/apps/emacs.svg")))
   t))
(144 . 144)

Thanks!




This bug report was last modified 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.