]> git.eshelyaron.com Git - emacs.git/commit
Improve image depth handling
authorPo Lu <luangruo@yahoo.com>
Fri, 4 Feb 2022 00:51:24 +0000 (08:51 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 4 Feb 2022 00:54:01 +0000 (08:54 +0800)
commitd539d00c4263e1d494213a0bcec655036405bd2e
tree3aa696fa7a2570c2b82b6761bf161506b45168c5
parent12a6d319dcff5f1954f926be979b81170df2806c
Improve image depth handling

Emacs defaults to a 32-bit TrueColor visual, but if that happens
on a display which defaults to 16-bit TrueColor, yet happens to
have 32-bit color, and doesn't have the X Render Extension, an
error will occur in x_composite_image as libXpm will load
pixmaps of depth 16 instead of depth 32.

* src/image.c (x_create_x_image_and_pixmap): Explictly specify
display depth.
(x_create_xrender_picture):
(xpm_load):
(gs_load): Use dpyinfo->n_planes instead of
DefaultDepthOfScreen.
src/image.c