Debian Codegraph @

doc/kate-format-bitmap.doc

raw
1 /* Copyright (C) 2008 Vincent Penquerc'h.
2 This file is part of the Kate codec library.
3 Written by Vincent Penquerc'h.
4
5 Use, distribution and reproduction of this library is governed
6 by a BSD style source license included with this source in the
7 file 'COPYING'. Please read these terms before distributing. */
8
9
10 /**
11
12 \page format_bitmap Format - bitmap
13
14 A bitmap definition consists of:
15
16 \li a \ref format_32v "variable length integer" representing the width of the bitmap in pixels.
17 \li a \ref format_32v "variable length integer" representing the height of the bitmap in pixels.
18 \li 8 bits representing the number of bits per pixel for this bitmap (values not in the 0-7 range are an error).
19
20 Then, if the number of bits per pixel is zero:
21
22 \li 8 bits representing the type of the bitmap.
23
24 For type 0 (paletted bitmap):
25
26 \li 8 bits for the encoding of this bitmap
27
28 For encoding 1 (RLE encoding):
29
30 \li a \ref format_32v "variable length integer" for the number of bits per pixel.
31 \li a \ref format_32v "variable length integer" for the index of the default palette to use for this bitmap (-1 if none)
32 \li a \ref format_rle "RLE encoded bitmap".
33
34 All other encodings are reserved. If one is encountered, the bitmap cannot be decoded.
35
36 For type 1 (PNG bitmap):
37
38 \li 32 bits for the number of bytes used for this bitmap's data.
39 \li That number of bytes, interpreted as a raw PNG stream.
40
41 All other types are reserved. If one is encountered, the bitmap cannot be decoded.
42
43 If the number of bits per pixel is greater than zero (deprecated):
44
45 \li a \ref format_32v "variable length integer" representing the index of the default palette to use for this bitmap (-1 for no default palette).
46 \li a stream of bits representing the pixel indices for this bitmap, rows first, packed (eg, N bits for the first pixel, N bits for the second one, etc, N being the number of bits per pixel specified above)
47
48
49 Next, we have a \ref format_warp "warp".
50
51 Bitstream version 0.4 starts making use of this warp:
52 \li a \ref format_32v "variable length integer" representing the horizontal offset to the logical center of the bitmap.
53 \li a \ref format_32v "variable length integer" representing the vertical offset to the logical center of the bitmap.
54
55 Kate bitstream 0.6 makes further use of this warp to add:
56
57 \li a \ref format_metadata "metadata" set.
58
59 Next, the data ends.
60
61 */
62