PPMTOANSI(1)

NAME
ppmtoansi - Graphics Conversion Program For Extended ANSI Escape Codes

SYNOPSIS
ppmtoansi [ -b r/g/b ] [ -t r/g/b:idx] [ -x <xoffset> ] [ -y <yoffset> ] [ <filename> ]

DESCRIPTION
ppmtoansi converts input files in ppm(5) format to escape sequences that are understood by etherboot. This allows for displaying icons and logos on the BOOT-Prom's splash screen.

If no input file is specified, data is read from standard input. All output is send to standard output, error messages go to standard error. ppmtoansi tries to do some compression and minimizes the output filesize.

OPTIONS

-b  Specifies the red, green,and blue intensities for the background color. This information is used for providing a shape mask. All values are in the range from 0 to 255.

-t  Allows for explicitly providing a translation between color values and color indices. The indices are in the range 0 to 7 and conform to the standard ANSI colorcodes.

    0 black 4 blue

    1 red 5 magenta

    2 green 6 cyan

    3 yellow 7 white

    If no translations apply, ppmtoansi will automatically select the color that is closest.

-x  Specify an X offset relative to the current text cursor position.

-y  Specify an Y offset relative to the current text cursor position.

FILE FORMAT
ppmtoansi uses these extensions to the standard ANSI escape codes.

<esc>[a;b;c;d+<data>
    Draw pixel data. Use one byte per pixel. Colors are encoded as shown above. In text mode, graphics is approximated by outputting suitable characters. Parameters differ depending on the number of parameters passed:

    cnt cnt data bytes follow. They will be drawn to the right of the last graphics position.

    rle;col
        The next rle pixels have the value col. They will be drawn to the right of the last graphics position. No data bytes follow.

    x;y;cnt
        cnt data bytes follow. They will be drawn relative to the top left corner of the text cursor with an offset of (x/y).

    x;y;rle;col
        the next rle pixels have the value col. They will be drawn relative to the top left corner of the text cursor with an offset of (x/y). No data bytes follow.

<esc>[a;b;c;d-<data>
    same as above, but pack pixels into three bits. The first pixel is stored in the three most significant bits of the first data byte.

SEE ALSO
ppm(5), mknbi-linux(8), mknbi-dos(8).