bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#74725: 31.0.50; image-scaling-factor is ignored by create-image


From: David Ponce
Subject: bug#74725: 31.0.50; image-scaling-factor is ignored by create-image
Date: Sat, 7 Dec 2024 13:41:37 +0100
User-agent: Mozilla Thunderbird

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!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]