# ppmconv*

## Description

The `ppmconv/ppmconv8/ppmconvbg` tools are used to change the full-color ppm format image to a C source format.

## How to Use

### Start Command

#### ppmconv*

`% ppmconv PPM_FILE`

Loads the image file in the full-color `ppm` format that is designated by `PPM_FILE`, converts it to a 16-bit color bitmap, then outputs the C language source file that can be directly used by the program.

#### ppmconv8

`% ppmconv8 PPM_FILE LABEL_NAME`

Loads the image file in the full-color `ppm` format that is designated by `PPM_FILE`, converts it to an 8-bit INDEX color bitmap, then outputs the C language source file that can be directly used by the program. The ppm format image file to be loaded must be reduced to 256 colors or less in advance using another image editing tool. The name of the array of the palette and the pixel data string are generated using `LABEL_NAME`.

#### ppmconvbg

`% ppmconvbg [-a LABEL_NAME] [-b] [-c 4|-c 8] [-p] [-i] PPM_FILE OUTPUT_FILE`

Loads the image file in the full-color `ppm` format that is designated by `PPM_FILE`, then outputs the data to `OUTPUT_FILE` according to the conditions designated by the following options:

> `-a LABEL_NAME`
>   Outputs in a C source format
>   Outputs in a format that can be compiled. The name of the array of the palette and the pixel data string is generated using `LABEL_NAME`.
> `-b`
>   Outputs in a binary format
>   This is convenient when performing processes such as further compression, etc. on the output data. The output data is in a binary format by default.
> `-c 4 or -c 8`
>   The number of bits of the color palette
>   Designates -c 4 when 16-color, and -c 8 when 256-color. The default is 256-color.
>   The ppm format file that will be input must be reduced to the number of colors designated here or less.
> `-p`
>   Outputs only palette data.
> `-i`
>   Outputs only the pixel data (the color index value).

## Location

`$NitroSDK/tools/bin/ppmconv.exe`
`$NitroSDK/tools/bin/ppmconv8.exe
$NitroSDK/tools/bin/ppmconvbg.exe`

## See Also

`gx/UnitTours/2D_BmpBg_MainRam`, `gx/UnitTours/2D_CharBg_256BMP`

## Revision History

08/26/2004 Initial Version

CONFIDENTIAL