Subject: fvwm2 cannot read xpms created by recent versions of ImageMagick?

From: Mike Fabian <[email-masked]>
Date: 11 Apr 2001 22:33:49 +0200

When converting *.png files to *.xpm with recent versions of convert
from the ImageMagick distribution, the produced *.xpm files
have color names like in the following example fallback.xpm.~1~:

I.e. the color names have 16 digits like "0000000000004047",
four digits each for red, green, and blue, and four additional digits
for the opacity.

fvwm 2.3.30 complains that it cannot read these xpm files.

After removing the 4 digits for the opacity, so that the xpm file
looks like:

fvwm 2.3.30 can read the xpm file.

Is this a problem of fvwm or a problem of "convert" from ImageMagick?

Should either of them be changed?

-- 
Mike Fabian   <[email-masked]>   http://www.suse.de/~mfabian

---

From: Dan Espen <[email-masked]>
Date: Wed, 11 Apr 2001 16:46:55 -0400

> have color names like in the following example fallback.xpm.~1~:

Its got to be a problem in the xpm library you are using.
Fvwm never parses that stuff itself, it calls xpm library functions
to do that.

You didn't post the message you got.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mike Fabian <[email-masked]>
Date: 11 Apr 2001 23:48:38 +0200

> Fvwm never parses that stuff itself, it calls xpm library functions

That seems to be libXpm

mfabian@gregory:~$ ldd /usr/X11R6/bin/fvwm2
        libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40026000)
        libstroke.so.0 => /usr/lib/libstroke.so.0 (0x40035000)
        [...]

which comes with XFree86-4.x. I believe that didn't change.
But the output of 

"ee", "xv", and "display" can display these *.xpm files, but none of
them links against libXpm, so they are probably parsing the xpm files
themselves.

> You didn't post the message you got.

Messages like the following:

    [...]
    [FVWM][scanForPixmap]: <<WARNING>> Couldn't load image from mini.BooksSideBySide.xpm
    [FVWM][scanForPixmap]: <<WARNING>> Couldn't load image from mini.kcalc.xpm
    [FVWM][scanForPixmap]: <<WARNING>> Couldn't load image from mini.fallback.xpm
    [FVWM][scanForPixmap]: <<WARNING>> Couldn't load image from mini.netscape.xpm
    [...]

---

From: Dan Espen <[email-masked]>
Date: Wed, 11 Apr 2001 19:26:20 -0400

>     [FVWM][scanForPixmap]: <<WARNING>> Couldn't load image from mini.BooksSid

I can confirm that it fails for me too, I'm using fvwm from almost current
CVS and libxpm.4.10.  The message I get is:

[FVWM][GetXPMFile]: <<ERROR>> XpmCreatePixmapFromXpmImage failed, rc -4

Then  a little while  after  I got that  fvwm   core dumped with  this
message:

388 Arithmetic Exception(coredump)

I never saw one of those before.
I'm not sure I restarted since my last recompile so I want to see if
I can recreate that part.

The -4 return code comes from the CreateColors routine in the Xpm library
indicating it couldn't do something with the color, I'm not sure what
yet.

I want to get fvwm current and check for new Xpm releases.
The problem does seem to be in the Xpm library.

Later,

---

From: Dan Espen <[email-masked]>
Date: Wed, 11 Apr 2001 20:20:57 -0400

Mike Fabian <[email-masked]> writes:
> --=-=-=
...
> four digits each for red, green, and blue, and four additional digits

When did 4 additional digits for the opacity become part of an
X color name?

On my Solaris system XparseColor fails on a colorname like that.

---

From: Mike Fabian <[email-masked]>
Date: 12 Apr 2001 02:38:15 +0200

> When did 4 additional digits for the opacity become part of an

I have no idea.

> On my Solaris system XparseColor fails on a colorname like that.

So you think I should patch the ImageMagick package to produce
colour names with 12 digits again, like it used to?

睡眠不足はいい仕事の敵だ。

---

From: Dan Espen <[email-masked]>
Date: Wed, 11 Apr 2001 21:56:16 -0400

> colour names with 12 digits again, like it used to?

If there is no way to tell it to leave the opacity out, go ahead.

I didn't see any version of the xpm library that would handle the
opacity value.  I don't know what you have there.