Bug 41196 - Xpms generated by convert cannot be read by libXpm
Xpms generated by convert cannot be read by libXpm
Product: Red Hat Linux
Classification: Retired
Component: ImageMagick (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Depends On:
  Show dependency treegraph
Reported: 2001-05-18 00:42 EDT by Need Real Name
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-05-18 00:42:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-05-18 00:42:55 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
ImageMagick 5.2.7 (incl. in RH7.1) seems to have a bug in it's XPM file
generation.  I'm not an expert in the format, but looking at XPMs generated
with RH6.1's version, one difference seems to be that convert is emitting
files with 2 extra (hex) bytes per color, ie:

==> under7.1.xpm <==
/* XPM */
static char *magick[] = {
/* columns rows colors chars-per-pixel */
"54 54 256 2",
"   c #341b3840",
".  c #3c3a0e40",


==> under6.1.xpm <==
/* XPM */
static char *magick[] = {
/* columns rows colors chars-per-pixel */
"54 54 256 2",
"   c #341b38",
".  c #3c3a0e",
"X  c #383c18",
"o  c #352f12",
"O  c #37312a",
"+  c #0e3217",

Use of convert's colordepth flags does not seem to have any effect on the
image file emitted ("-depth 8" or "-depth 16").  

How reproducible:

Steps to Reproduce:
1. Get an image file (I've tried both GIF and JPG)
2. Under RH6.1, run "convert -geom 54x54 <image> under6.1.xpm"
	(optional, but can illustrate the difference..)
3. Under RH7.1, run "convert -geom 54x54 <image> under7.1.xpm"
4. Under RH7.1 try to use xpmroot (a libXpm program) to place your
	xpm image(s) on your X backround ("xpmroot <file>").

XPMs generated by the convert distributed with 7.1 won't be successfully

Actual Results:  % xpmroot under7.1.xpm
Couldn't allocate required colors
[image not displayed on X backround]

The C function XpmReadFileToPixmap(..) returns -2 (XpmFileInvalid, see

Expected Results:  File displayed on X backround (xpm file generated with
older convert works under RH7.1).

Additional info:

X is running at 15bpp (yes, fifteen..  Riva 128 card).  
This is a clean RH7.1 install, no LD_LIBRARY_PATH settings, etc.
Comment 1 Bernhard Rosenkraenzer 2001-05-20 06:09:25 EDT
Fixed in 5.3.3-2

Note You need to log in before you can comment on or make changes to this bug.