Subject: bug#47036: 27.1; XBM file image cannot be resized with :width and :height

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 10 Mar 2021 16:10:30 +0100

[email-masked] writes:

> Evaluating the form below, XBM image with :height property is not
> displayed in the first and second inserted line.
>
> (let ((img1 (find-image '((:file "gnus/gnus.xbm" :type xbm :height 100))))
>       (img2 (find-image '((:file "gnus/gnus.xbm" :type xbm :width 100))))
>       (img3 (find-image '((:file "gnus/gnus.xbm" :type xbm))))
>       (img4 (find-image '((:file "gnus/gnus.xpm" :type xpm :height 100 )))))
>   (insert "with :height\t")
>   (insert-image img1 "ALTTEXT1")
>   (insert "\nwith :width\t")
>   (insert-image img2 "ALTTEXT2")
>   (insert "\nwithout :width or :height\t")
>   (insert-image img3 "ALTTEXT3")
>   (insert "\nXPM with :height\t")
>   (insert-image img4 "ALTTEXT4"))

I can reproduce this problem in Emacs 28, too (with Debian/bullseye).

I guess Emacs should support scaling of xbm images, too, now that we
have native image scaling?  Or is there something in particular with the
xbm code that doesn't allow that?  (I haven't looked at the code yet.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no