aboutsummaryrefslogtreecommitdiffstats
path: root/lss16.5
diff options
context:
space:
mode:
Diffstat (limited to 'lss16.5')
-rw-r--r--lss16.561
1 files changed, 61 insertions, 0 deletions
diff --git a/lss16.5 b/lss16.5
new file mode 100644
index 0000000..0454f5c
--- /dev/null
+++ b/lss16.5
@@ -0,0 +1,61 @@
+.TH LSS16 5 LIBLSS16
+.SH NAME
+lss16 \- SYSLINUX \(dqad hoc\(dq 16-colour, 6-bit channel-depth image file format LSS16
+
+.SH DESCRIPTION
+LSS16 is run-length encoding compressed, lossless an image file format
+using a 16-colour palette and sRGB 6-6-6. LSS16 is designed for bootloader splash
+images which may be displayed on low-end legacy devices with limited image quality
+capabilities. LSS16 does not support transparency.
+.PP
+LSS16 file consists how two parts: a 56 byte header followed by the pixel encoding.
+.PP
+Header format:
+.RS
+4-byte magic number: 3Dh, F3h, 13h, 14h.
+
+Image width (number of pixels horizontally): unsigned 16-bit integer, little endian.
+
+Image height (number of pixels horizontally): unsigned 16-bit integer, little endian,
+however the most significant bit most be cleared.
+
+Colour palette: 16 RGB-tuples, each tuple is 3 bytes: red, green, blue.
+The two most significant bits in each byte must be cleared.
+.RE
+.PP
+Pixel encoding format:
+.RS
+The pixels are encoded, row by row, from the top down, in a sequence of nibble. Each
+row is encoded from left to right, and odd-nibble rows are padded with a zero-nibble.
+Each encoded byte, is split into two nibbles; the lower part of the byte makes up the
+first nibble, and the higher part of the byte makes up the second nibble.
+
+At the beginning of each row, the previous pixel is assumed to use the 0-indexed colour.
+
+If a nibble as the value of the the previous pixel colour index, a run-length is encoded,
+otherwise the next pixel has the colour with the index encoded in the nibble.
+
+If the nibble encodes a run-length, it can either be 0 or the number of times the
+previous pixel is repeated (excluding the already existing pixels). If the nibble
+is 0, the next two nibbles, encodes in little-endian, a value
+.IR N ,
+and the previous pixel is repeated
+.IR N +16
+times (excluding the already existing pixels).
+.RE
+.PP
+A 6-bit colour-channel
+value
+.I N
+is mapped to 8-bits with the function
+.I (N*255+31)/63
+(linear scaling).
+.PP
+LSS16 image files usually have the filename suffix
+.RB \(dq .lss \(dq
+or
+.RB \(dq .16 \(dq.
+
+.SH SEE ALSO
+.BR liblss16 (7),
+.BR syslinux (1)