2023-11-08 15:48:12 +01:00
|
|
|
# ppmtoxpm
|
|
|
|
|
|
|
|
> Convert a PPM image to an X11 version 3 pixmap.
|
|
|
|
> More information: <https://netpbm.sourceforge.net/doc/ppmtoxpm.html>.
|
|
|
|
|
|
|
|
- Convert a PPM image to a XPM image:
|
|
|
|
|
|
|
|
`ppmtoxpm {{path/to/input_file.ppm}} > {{path/to/output_file.xpm}}`
|
|
|
|
|
|
|
|
- Specify the prefix string in the output XPM image:
|
|
|
|
|
2025-04-01 06:42:14 +03:00
|
|
|
`ppmtoxpm {{[-n|-name]}} {{prefix_string}} {{path/to/input_file.ppm}} > {{path/to/output_file.xpm}}`
|
2023-11-08 15:48:12 +01:00
|
|
|
|
|
|
|
- In the output XPM file, specify colors by their hexadecimal code instead of their name:
|
|
|
|
|
2025-04-01 06:42:14 +03:00
|
|
|
`ppmtoxpm {{[-h|-hexonly]}} {{path/to/input_file.ppm}} > {{path/to/output_file.xpm}}`
|
2023-11-08 15:48:12 +01:00
|
|
|
|
|
|
|
- Use the specified PGM file as a transparency mask:
|
|
|
|
|
2025-04-01 06:42:14 +03:00
|
|
|
`ppmtoxpm {{[-a|-alphamask]}} {{path/to/alpha_file.pgm}} {{path/to/input_file.ppm}} > {{path/to/output_file.xpm}}`
|