xpm2axpm(1)

xpm2axpm1

Convert xpm pixmap files into a form 'with'-able in ada programs

Usage

xpm2axpm xpm_file > ada_spec_file

Overview

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.

Examples

$ 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 <[email protected]>.

This manual page was written by Ludovic Brenta <[email protected]> for Debian GNU/Linux.

From libadabindx-dev 0.7.2-4 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.