UNPKG

s2-tools

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

70 lines 1.99 kB
import type { Reader } from '..'; /** Component defined Image tile */ interface ComponentTile { left: number; top: number; width: number; height: number; items: Uint8ClampedArray; } /** * Jpeg2000 image decoder * @returns - the Jpeg2000 image */ export declare class JpxImage { failOnCorruptedImage: boolean; width: number; height: number; componentsCount: number; tiles: ComponentTile[]; /** @param reader - the reader to parse from */ constructor(reader: Reader | undefined); /** * parse the input data into components * @param reader - the reader to parse from */ parse(reader: Reader): void; /** * parse the input data into components * @param data - compressed data * @param start - start index * @param end - end index */ parseCodestream(data: Reader, start: number, end: number): void; } /** * This class implements the QM Coder decoding as defined in * JPEG 2000 Part I Final Committee Draft Version 1.0 * Annex C.3 Arithmetic decoding procedure * available at http://www.jpeg.org/public/fcd15444-1.pdf * * The arithmetic decoder is used in conjunction with context models to decode * JPEG2000 and JBIG2 streams. */ export declare class ArithmeticDecoder { data: Uint8Array; start: number; end: number; a: number; chigh: number; ct: number; clow: number; /** * C.3.5 Initialisation of the decoder (INITDEC) * @param data - compressed data * @param start - start index * @param end - end index */ constructor(data: Uint8Array, start: number, end: number); /** C.3.4 Compressed data input (BYTEIN) */ byteIn(): void; /** * C.3.2 Decoding a decision (DECODE) * @param contexts - context models * @param pos - context model index * @returns 0 or 1 */ readBit(contexts: number[] | Int8Array, pos: number): number; } export {}; //# sourceMappingURL=jpeg2000.d.ts.map