Eli writes: >> However the png-image is still not scaled, and still shown in the larger >> canvas. > What do you mean by "shown in the larger canvas"? I mean that the original 16x16 pixel image is shown in the corner of a 320x320 pixel white box. As can be seen in the screenshot here: ยท https://debbugs.gnu.org/cgi/bugreport.cgi?att=1;filename=emacs27-image-scaling.png;bug=38109;msg=5 > Can you post a screenshot of how you see those PNG images with and > without scaling, after applying that patch? The patch doesn't make any difference on the scaling of the PNG images. --with-cairo does. Here is a screenshot of the attached .png with and without scaling, without the patch and without Cairo (i.e. with Xrender):