emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#50904: closed (TODO: Deprecate and remove XPM icons (replacing them


From: GNU bug Tracking System
Subject: bug#50904: closed (TODO: Deprecate and remove XPM icons (replacing them with PPM))
Date: Fri, 01 Oct 2021 11:09:01 +0000

Your message dated Fri, 1 Oct 2021 13:08:42 +0200
with message-id 
<CADwFkmmf-u5otkAai8r11wEKxs_Vx2OARgz1Eo5yygDtNoXpUw@mail.gmail.com>
and subject line Re: bug#50904: TODO: Deprecate and remove XPM icons (replacing 
them with PPM)
has caused the debbugs.gnu.org bug report #50904,
regarding TODO: Deprecate and remove XPM icons (replacing them with PPM)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
50904: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50904
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: TODO: Deprecate and remove XPM icons (replacing them with PPM) Date: Wed, 29 Sep 2021 14:47:51 -0700
Severity: wishlist

In etc/TODO we have the following item:

    ** Deprecate and remove XPM icons
    Convert the XPM bitmaps to PPM, replace the PBMs with them and scrap
    the XPMs so that the color versions work generally.  (Requires care
    with the color used for the transparent regions.)

Here's what I've gathered so far, posting it here to save someone else
the trouble:

PPM (Portable PixelMap) is the color version of PBM (Portable BitMap)
and has as good support.[1]  XPM is an older format.

There are previous discussions on emacs-devel, but I have only been able
to track some of them down.  The TODO itself dates back to February 2003
(bf6394a6bed2).

I have tried to convert the images with netpbm using this:

    cd etc/images
    xpmtoppm --alphaout=attach.alpha attach.xpm | \
          pnmcomp -alpha=attach.alpha - > attach.ppm
    pnmcomp: bad magic number 0x0 - not a PAM, PPM, PGM, or PBM file

But then I don't get any further.

I have also tried with the newer pamcomp (that replaces pnmcomp):

    cd etc/images
    xpmtoppm --alphaout=attach.alpha attach.xpm | \
             pamcomp attach.alpha - atach.ppm

That just leads to an image that looks wrong.

With GraphicsMagick, I used "gc convert attach.xpm attach.ppm" but the
results looked all wrong.

With GIMP it seems like I can produce images that preserve the alpha
channels correctly, but perhaps not in all cases.  It also seems like
different files produce different results, maybe?  But on balance,
perhaps a combination of GIMP and GraphicsMagick would be best.

---

Be aware that Debian has an old forked version of netpbm from 2002, so
if you want to use xpmtoppm, you need to install netpbm from
SourceForge.  Luckily, there are .deb packages available (as well as
source tarballs).

Footnotes:
[1]  https://lists.gnu.org/r/emacs-devel/2002-09/msg00949.html



--- End Message ---
--- Begin Message --- Subject: Re: bug#50904: TODO: Deprecate and remove XPM icons (replacing them with PPM) Date: Fri, 1 Oct 2021 13:08:42 +0200
Eli Zaretskii <eliz@gnu.org> writes:

> > So I'm not sure I agree with that TODO item, unless I'm missing
> > something (which I may well be).
>
> I agree.  It sounds like this item is outdated, and we should delete
> it.

Ugh, I wasted over 2 hours on this...

I've now removed this from etc/TODO (commit f733b909ff), and I'm
closing this bug.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]