utils: Use the host toolchain to build.
[syslinux.git] / man / ppmtolss16.1
blob954e94bdd2b08fb92c08b20f723cf8c3d9b045d3
1 .TH "PPMTOLSS16" "1"
2 .SH "NAME"
3 ppmtolss16 \(em Convert a PPM to an LSS16 image
4 .SH "SYNOPSIS"
5 .PP
6 \fBppmtolss16\fR [        \fB     \fI#rrggbb\fR=\fIi\fR         \fP        \&...]  [< input.ppm]  [> output.rle]
7 .SH "DESCRIPTION"
8 .PP
9 This manual page documents briefly the \fBppmtolss16\fR command.
11 .PP
12 The \fBppmtolss16\fR program converts a "raw" PPM file with
13 max 16 colors to a simple RLE-based format:
15 .PP
16 \fBsimple RLE-based format\fR
17 .TS
18 tab(\a);
19 l l.
20 unint32 0x1413f3d\amagic (littleendian)
21 unint16 xsize\alittleendian
22 unint15 ysize\alittleendian
23 16 x unint8 r,g,b\acolor map
24 .TE
25 .PP
26 Color map is in 6-bit format (each byte is 0..63)
27 .PP
28 Then, a sequence of nybbles:
29 .PP
30 N   ... if N is != previous pixel, one pixel of color N, otherwise
31 run sequence follows ...
33 .PP
34 M   ... if M > 0 then run length is M+1, otherwise run sequence is
35 encoded in two nybbles, littleendian, +17
37 .PP
38 The nybble sequences are on a per-row basis, runs may not extend across
39 rows and odd-nybble rows are zero-padded.
41 .PP
42 At the start of a row, the "previous pixel" is assumed to be zero.
44 .SH "OPTIONS"
45 .PP
46 A summary of options is included below.
47 .IP "\fB\fI#rrggbb\fR=\fIi\fR\fP" 10
48 Specify that the color #rrggbb (hex) should be assigned index
49 i (decimal).
51 .SH "BUG"
52 .PP
53 This program cannot handle comments in the header, nor "plain" ppm
54 format.
56 .SH "SEE ALSO"
57 .PP
58 \fBppmtolss16\fR(1)
60 .SH "AUTHOR"
61 .PP
62 This manual page was compiled by dann frazier <dannf@debian.org> for
63 the \fBDebian GNU/Linux\fP system (but may be used by others).  Most of the content
64 was written by H. Peter Anvin.