ppmtouil
Convert PPM image to UIL description
TLDR
View documentation for the current command
SYNOPSIS
ppmtouil [-name pixmap_name] [-output filename]
PARAMETERS
-name pixmap_name
Specifies the name to use for the pixelmap resource in the UIL file. If this is omitted, the name defaults to 'image'. This parameter is case-sensitive and should follow UIL naming conventions.
-output filename
Specifies the name of the output file to write the UIL description to. If this is omitted, the UIL description is written to standard output.
DESCRIPTION
The ppmtouil command converts a Portable Pixmap (PPM) image into a User Interface Language (UIL) description file. UIL is a language used by the Motif toolkit for defining graphical user interfaces. The resulting UIL file contains declarations of pixelmap resources that can be included in a Motif application. This allows you to embed images directly into your application's interface. The command reads the PPM image from standard input and writes the UIL description to standard output. You can then incorporate the generated UIL code into your Motif UIL description file, compile it using the uil compiler, and link it with your Motif application. The ppmtouil command simplifies the process of integrating images into Motif-based GUIs by automating the conversion to the required UIL format. It is an essential tool for Motif developers who want to include images in their applications.
CAVEATS
The ppmtouil command only handles PPM (Portable Pixmap) images.
It's important to ensure that the provided PPM image is in the correct format (P6 binary format).
The generated UIL file requires further processing with the uil compiler and linking with Motif libraries to be used in an application.
EXAMPLE
To convert an image named 'myimage.ppm' to UIL with the pixelmap resource named 'MyImage', saving the output to 'myimage.uil', use the following command:
ppmtouil -name MyImage -output myimage.uil < myimage.ppm
HISTORY
The ppmtouil command was developed as part of the Netpbm suite, a collection of utilities for manipulating bitmap images. Its creation was driven by the need for a convenient way to integrate image data into Motif applications, which used UIL for interface definition. Its usage peaked during the widespread adoption of Motif in the late 1980s and early to mid 1990s and is relatively niche today.
SEE ALSO
ppm(5), uil(1), motif(3)