NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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



The following reply was made to PR xsrc/60399; it has been noted by GNATS.

From: Jeff_W<jgw%sdf.org@localhost>
To: xsrc-manager%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, gnats-bugs%netbsd.org@localhost,
        gnats-admin%netbsd.org@localhost
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" <gnats-admin%NetBSD.org@localhost> wrote:
 
 > The following reply was made to PR xsrc/60399; it has been noted by GNATS.
 >
 > From: mlelstv%serpens.de@localhost (Michael van Elst)
 > To: gnats-bugs%netbsd.org@localhost
 > 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)
 >
 >  gnats-admin%NetBSD.org@localhost ("jgw%sdf.org@localhost 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
 



Home | Main Index | Thread Index | Old Index