zxing-wasm
Version:
ZXing-C++ WebAssembly as an ES/CJS module with types
19 lines (18 loc) • 782 B
TypeScript
export declare const BINARIZERS: readonly ["LocalAverage", "GlobalHistogram", "FixedThreshold", "BoolCast"];
/** @deprecated Use {@link BINARIZERS} instead. */
export declare const binarizers: readonly ["LocalAverage", "GlobalHistogram", "FixedThreshold", "BoolCast"];
export type Binarizer = (typeof BINARIZERS)[number];
/**
* Encodes a binarizer to its numeric representation.
*
* @param binarizer - The binarizer to encode
* @returns A number representing the encoded binarizer
*/
export declare function encodeBinarizer(binarizer: Binarizer): number;
/**
* Decodes a binarizer from a numeric identifier.
*
* @param number - The numeric identifier of the binarizer
* @returns The decoded binarizer
*/
export declare function decodeBinarizer(number: number): Binarizer;