Reference

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

This manual page was written by Ludovic Brenta <[email protected]> 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), XPutImage(3X11), sxpm(1)