jsqr
Version:
A pure javascript QR code reading library that takes in raw images and will locate, extract and parse any QR code found within.
28 lines (27 loc) • 634 B
TypeScript
export interface Chunk {
type: Mode;
text: string;
}
export interface ByteChunk {
type: Mode.Byte | Mode.Kanji;
bytes: number[];
}
export interface ECIChunk {
type: Mode.ECI;
assignmentNumber: number;
}
export declare type Chunks = Array<Chunk | ByteChunk | ECIChunk>;
export interface DecodedQR {
text: string;
bytes: number[];
chunks: Chunks;
version: number;
}
export declare enum Mode {
Numeric = "numeric",
Alphanumeric = "alphanumeric",
Byte = "byte",
Kanji = "kanji",
ECI = "eci"
}
export declare function decode(data: Uint8ClampedArray, version: number): DecodedQR;