Convert PNM to XPM

Turn PNM images into XPM. An X11 pixmap written as C source text, with a color palette and transparency.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop PNM files on the dialor turn it to pick what to do

An X11 pixmap from your PNM image.The image becomes C source text with a color palette and transparency.

  1. What you get

    One XPM file. It is an X11 pixmap written as C source text, so you can open it in a text editor as well as in an image program.

    The colors are listed in a palette, and the image refers to them. Transparency is supported in the output.

  2. Input formats

    PNM covers three simple formats: PBM, PGM and PPM. Files with the pnm, ppm, pgm or pbm extension are the input for this conversion.

  3. Going the other way

    To turn an XPM back into a PNM image, use XPM to PNM. For other XPM conversions, see every XPM conversion.

PNM and XPM.What each format is.

The formats

From · PNM

Portable Anymap

Portable anymap images, the simplest raster format: PBM, PGM and PPM.

Extensions
.pnm .ppm .pgm .pbm
MIME type
image/x-portable-anymap
Kind
Images
To · XPM

X PixMap

X PixMap, images as C source.

Extensions
.xpm
MIME type
image/x-xpixmap
Kind
Images

In your code.The same PNM to XPM conversion through the API, for your app or your agent.

terminal
$ cv convert photo.pnm photo.xpm
$ cv convert photo.pnm photo.xpm

Questions.What people ask about PNM to XPM.

01OF 04

Yes. XPM is C source text, so the file is readable as text.

Yes. The XPM is written with a color palette and transparency.

PBM, PGM and PPM files, with the extensions pnm, ppm, pgm or pbm.

You get one file.

More conversions.Other ways in and out of PNM and XPM.