aboutsummaryrefslogtreecommitdiffstats
path: root/lss16toppm.1
blob: 560a76bde86d4702988431f7b44c8069f994cc18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.TH LSS16TOPPM 1 LIBLSS16
.SH NAME
lss16toppm \- Convert an LSS16 file to a Portable Pixmap (PPM) file

.SH SYNPOSIS
.B lss16toppm
.RB [ -map ]
.RI "< " lss16-file
.RI "> " ppm-file

.SH DESCRIPTION
The
.B lss16toppm
utility converts the LSS16 image file
.I lss16-file
to a Portable Pixmap (PPM) file, storing it to
.IR ppm-file .
.PP
The PPM file will be raw (P6) and use full 8-bit colours
per channel (0-255). This means that the colours are
scaled up from 6-bits to 8-bits, per channel, as LSS16
only uses 6 bits per channel.

.SH OPTIONS
The
.B lss16toppm
utility parses each argument as an option, including
.RB \(dq -- \(dq.
.PP
The following option is supported:
.TP
.B -map
Output the image's colour palette to the standard error.
The image has 16 mapped colours, will be printed in order,
from index 0 up, in the format

.nf
\fB\(dq#%02x%02x%02x=%u\(dq, \fP<\fIred\fP>\fB, \fP<\fIgreen\fP>\fB, \fP<\fIblue\fP>\fB, \fP<\fIcolour index\fP>.
.fi

Although LSS16 uses 6 bit per colour channel, the output
colours are scaled up to and output as 8 bit per colour
channel.

.SH OPERANDS
None.

.SH STDIN
The standard input shall be the LSS16 file to convert.

.SH INPUT FILES
None.

.SH STDOUT
The image will be printed as a 8-bit raw Portable Pixmap
(P6 PPM) to the standard output.

.SH STDERR
The standard error is used for diagnostic purposes. If the
.B -map
option is used, the colour palette will also be printed to
the standard error, apart from this, nothing is output to
the standard error if the exist value of the process is
.BR 0 .

.SH OUTPUT FILES
None.

.SH EXIT STATUS
The following exit values are returned:
.TP
0
Successful completion.
.TP
1
The standard input is not an valid LSS16 file.
.TP
2
An error occured.

.SH NOTES
The SYSLINUX implementation of the
.BR lss16toppm
utility does used the exit value
.BR 2 ,
but instead always returns 1 on failure.

.SH RATIONALE
The invocation syntax is inherited from the SYSLINUX
implementation of
.BR lss16toppm .
As is the output as raw 8-bit PPM (P6).

.SH SEE ALSO
.BR lss16 (5),
.BR ppmtolss16 (1),
.BR liblss16 (7),
.BR syslinux (1)