Fix image scaling with masks (bug#38109)

* src/image.c (lookup_image): Move call to image_set_transform after
postprocess_image.
(image_create_x_image_and_pixmap_1): Use new function.
(image_set_transform): Apply the transform to the mask too.
(x_create_xrender_picture): New function.
(Create_Pixmap_From_Bitmap_Data):
(xpm_load): Use new function.
* src/xterm.c (x_composite_image): Use PictOpOver when there is a mask
so the transparency is honoured.
(x_draw_image_foreground_1): Use x_composite_image.
1 job for master in 56 minutes and 42 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
failed #4390
test-all

00:56:42

 
Name Stage Failure
failed
test-all Test
make[2]: *** [check-doit] Error 1
Makefile:319: recipe for target 'check-doit' failed
make[2]: Leaving directory '/builds/emacs/emacs/test'
Makefile:294: recipe for target 'check-expensive' failed
make[1]: Leaving directory '/builds/emacs/emacs/test'
make[1]: *** [check-expensive] Error 2
Makefile:959: recipe for target 'check-expensive' failed
make: *** [check-expensive] Error 2
ERROR: Job failed: exit code 1