Lines Matching +full:data +full:- +full:bits
6 * Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved.
33 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
36 *-- The first byte of each Tight-encoded rectangle is a "compression control
43 * bits 7-4: if 1000 (0x08), then the compression type is "fill",
49 * If the compression type is "basic", then bits 6..4 of the
52 * bits 5-4: decimal representation is the index of a particular zlib
53 * stream which should be used for decompressing the data;
56 *-- The data that follows after the compression control byte described
59 *-- If the compression type is "fill", then the only pixel value follows, in
63 *-- If the compression type is "jpeg" or "png", the following data stream
66 * 1..3 bytes: data size (N) in compact representation;
69 * Data size is compactly represented in one, two or three bytes, according
77 * bits of the value (bits 0-6), yyyyyyy are bits 7-13, and zzzzzzzz are the
78 * most significant 8 bits (bits 14-21). For example, decimal value 10000
82 *-- If the compression type is "basic" and bit 6 of the compression control
84 * tells the decoder what filter type was used by the encoder to pre-process
85 * pixel data before the compression. The "filter id" byte can be one of the
92 *-- If bit 6 of the compression control byte is set to 0 (no "filter id"
97 *-- The "gradient" filter pre-processes pixel data with a simple algorithm
100 * uncompressed data size, but helps to compress photo-like images better.
101 * Pseudo-code for converting intensities to differences is the following:
103 * P[i,j] := V[i-1,j] + V[i,j-1] - V[i-1,j-1];
106 * D[i,j] := V[i,j] - P[i,j];
112 *-- The "palette" filter converts true-color pixel data to indexed colors
114 * is 2, then each pixel is encoded in 1 bit, otherwise 8 bits is used to
115 * encode one pixel. 1-bit encoding is performed such way that the most
116 * significant bits correspond to the leftmost pixels, and each raw of pixels
118 * palette is sent before the pixel data. The palette begins with an unsigned
124 *-- The pixel data is compressed using the zlib library. But if the data
126 * then the data is sent as is, uncompressed. Four separate zlib streams
130 * If the compression is not used, then the pixel data is sent as is,
131 * otherwise the data stream looks like this:
133 * 1..3 bytes: data size (N) in compact representation;
134 * N bytes: zlib-compressed data.
136 * Data size is compactly represented in one, two or three bytes, just like
139 *-- NOTE 1. If the color depth is 24, and all three color components are
140 * 8-bit wide, then one pixel in Tight encoding is always represented by
145 *-- NOTE 2. The decoder must reset compression streams' states before
146 * decoding the rectangle, if some of bits 0,1,2,3 in the compression control
150 *-- NOTE 3. The "gradient" filter and "jpeg" compression may be used only
151 * when bits-per-pixel value is either 16 or 32, not 8.
153 *-- NOTE 4. The width of any Tight-encoded rectangle cannot exceed 2048