Bug 41196 - Xpms generated by convert cannot be read by libXpm
Summary: Xpms generated by convert cannot be read by libXpm
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ImageMagick   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-05-18 04:42 UTC by Need Real Name
Modified: 2008-05-01 15:38 UTC (History)
0 users

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

Attachments (Terms of Use)

Description Need Real Name 2001-05-18 04:42:55 UTC
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 10:09:25 UTC
Fixed in 5.3.3-2

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