---
name: "xpm2axpm"
section: "1"
platform: "linux"
package: "libadabindx-dev"
version: "0.7.2-4"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/xpm2axpm"
---

# xpm2axpm(1)

Convert XPM pixmap files into a form 'with'-able in Ada programs

## NAME

xpm2axpm - Convert XPM pixmap files into a form 'with'-able in Ada programs

## SYNOPSIS

**xpm2axpm** *xpm\_file* \> *ada\_spec\_file*

## DESCRIPTION

**xpm2axpm** reads the specified *xpm\_file*, which must contain an X PixMap, and writes Ada source code on standard output.  The Ada source code contains a package specification, named after the *xpm\_file*, with a single variable.  This variable is always named **Pix**, and it contains the X pixmap as an object of type **Xpm\_Lib.Pixmap\_Data\_Type**.

You can then use the package by with-ing it into your own programs. This makes it possible to embed pixmaps in your programs.

There are many programs that can save images as X pixmaps.  Among others: the Gimp, and XPaint.

## EXAMPLE

```
$ xpm2axpm /usr/share/doc/libadabindx/ladyada.xpm > ~/ladyada.ads
```

Now, you can write a program with the logo embedded in it, like this:

```
with LadyAda;
with Xpm_Lib;
--  ...
   Xpm_Lib.Xpm_Create_Image_From_Data
     (Display => My_Display,
      Data => LadyAda.Pix,
      Image => My_XImage_Pointer,
      Shape_Image => My_Shape_XImage_Pointer);
--  ...
```

## AUTHOR

**xpm2axpm** was written by Hans-Frieder Vogt \<hfvogt@nexgo.de\>.

This manual page was written by Ludovic Brenta \<ludovic.brenta@insalien.org\> for Debian GNU/Linux.

## SEE ALSO

The Ada package specifications Xpm\_Lib and X\_Lib in */usr/share/ada/adainclude/libadabindx/xpm\_lib.ads* and */usr/share/ada/adainclude/libadabindx/x\_lib.ads*, respectively.

[**X**(7x)](/X/7x.md), **XPutImage**(3X11), [**sxpm**(1)](/sxpm/1.md)
