GNU bug report logs -
#74725
31.0.50; image-scaling-factor is ignored by create-image
Previous Next
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
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.