Subject: Re: bug#33126: 26.1; xpm2 broken in MacOSX

From: Alan Third <[email-masked]>
Date: Wed, 24 Oct 2018 12:17:36 +0100

On Tue, Oct 23, 2018 at 10:02:06PM +0800, Devon Sean McCullough wrote:
> ; This code inserts four images
> ; 1 - a correct checkerboard
> ; 2 - an incorrect blank image of the wrong size
> ; 3 - a correct "blarg"
> ; 4 - a correct checkerboard
> ; but the middle two images should look identical.

Confirmed. I found this in image.c:

/* XPM support functions for NS where libxpm is not available.
   Only XPM version 3 (without any extensions) is supported.  */

I suppose to get xpm2 support you’ll have to find a version of libxpm
somewhere.

There is an error logged in *Messages*, perhaps it should specify XPM3
per the attached patch.
-- 
Alan Third
>From 9d9b85529bbd560305e4bcc3823aad23e393ee74 Mon Sep 17 00:00:00 2001
From: Alan Third <[email-masked]>
Date: Wed, 24 Oct 2018 12:15:16 +0100
Subject: [PATCH] Improve XPM load failure message (bug#33126)

* src/image.c (xpm_load_image): Only XPM3 is supported, so make that
explicit.
---
 src/image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/image.c b/src/image.c
index 767979e63b..a6b2d9060b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -4308,7 +4308,7 @@ xpm_load_image (struct frame *f,
   return 1;
 
  failure:
-  image_error ("Invalid XPM file (%s)", img->spec);
+  image_error ("Invalid XPM3 file (%s)", img->spec);
   x_destroy_x_image (ximg);
   x_destroy_x_image (mask_img);
   x_clear_image (f, img);
-- 
2.18.0