Re: xsrc/60399: /usr/X11R7/include/X11/pixmaps/NetBSD-flag2.xpm has bad colormap

"Jeff_W via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.bugs
Message-ID <[email protected]>
The following reply was made to PR xsrc/60399; it has been noted by GNATS.

From: Jeff_W<[email protected]>
To: [email protected], [email protected], [email protected],
        [email protected]
Cc: 
Subject: Re: xsrc/60399: /usr/X11R7/include/X11/pixmaps/NetBSD-flag2.xpm has
 bad colormap
Date: Fri, 03 Jul 2026 08:04:59 -0600

 "Michael van Elst via gnats" <[email protected]> wrote:
 
 > The following reply was made to PR xsrc/60399; it has been noted by GNATS.
 >
 > From: [email protected] (Michael van Elst)
 > To: [email protected]
 > Cc: 
 > Subject: Re: xsrc/60399: /usr/X11R7/include/X11/pixmaps/NetBSD-flag2.xpm has bad colormap
 > Date: Fri, 3 Jul 2026 06:05:08 -0000 (UTC)
 >
 >  [email protected] ("[email protected] via gnats") writes:
 >  
 >  >	install the ImageMagick package and attempt to display with the
 >  >        'display <file>' command, then run 'identify <file>' which shows
 >  >        --
 >  >        identify: unrecognized color `Grey' @ warning/color.c/GetColorCompliance/1064.
 >  >        identify: corrupt image `/usr/X11R7/include/X11/pixmaps/NetBSD-flag2.xpm' @ error/xpm.c/ReadXPMImage/475.
 >  
 >  
 >  That's more a bug in ImageMagick.
 >  
 >  XPM format is defined to allow any X11 color name and X11 has always
 >  allowed both spellings.
 >  
 >  Doesn't mean it is well defined. The list of color names has been
 >  modified in the past.
 >  
 >  xpmtoppm for example reads a private rgb.txt file that includes a
 >  color name like AlizarinCrimson, which is not included in our
 >  (NetBSD base) rgb.txt file but which contains the name crimson (and
 >  both colors are slightly different).
 >  
 >  The program 'xv' uses libX11 to lookup color names, which obviously
 >  uses the locally installed X11 rgb.txt (and the local Xcms color
 >  name database but which only contains red, green and blue).
 >  
 >  ImageMagick contains its own color names, that interestingly enough
 >  include the name LightGrey and grey. Still LightGrey is not
 >  recognized for xpm files because:
 >  
 >      { "LightGray", 211, 211, 211, 1, SVGCompliance | X11Compliance | XPMCompliance },
 >      { "LightGrey", 211, 211, 211, 1, SVGCompliance | X11Compliance },
 >  
 >      { "grey", 190, 190, 190, 1, SVGCompliance | X11Compliance },               
 >      { "gray", 190, 190, 190, 1, X11Compliance | XPMCompliance },
 >  
 >  
 >  The sxpm program (part of the libXpm distribution and in NetBSD)
 >  uses libX11 like 'xv' but you can pass it an additional rgb.txt
 >  file to lookup color names from. This adds compatibility to
 >  multiple environments that use different color names (or different
 >  values for the same name).
 >  
 >  
 >  XPM format also allows explicit color values in multiple color
 >  name spaces including plain RGB. To avoid issues between
 >  American, Canadian and UK speakers we could avoid using names
 >  at all in the NetBSD flag XPM files.
 >  
 >  On the other hand the NetBSD-flag2.xpm contains color names in
 >  both spellings, so that it will only work in a less atelophobic
 >  world.
 >  
 
 Ah well okay, the bug squash team can decide what if anything to
 do here.  I was just surprised ImageMagick had an issue with the
 file as I've used it for years for format conversion as well as
 other things and it seems pretty tolerant.  When I saw it flagged
 NetBSD-flag2.xpm as corrupted I tested NetBSD-flag1.xpm which had
 no similar issue with it's colormap so decided to file a PR.
 
 Regards,
 jgw
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.