MCPcopy
hub / github.com/zxing-js/library / Reader

Interface Reader

src/core/Reader.ts:39–76  ·  view source on GitHub ↗

* Implementations of this interface can decode an image of a barcode in some format into * the it: string encodes. For example, com.google.zxing.qrcode.QRCodeReader can * decode a QR code. The decoder may optionally receive hints from the caller which may help * it decode more quickly or

Source from the content-addressed store, hash-verified

37 * @author dswitkin@google.com (Daniel Switkin)
38 */
39interface Reader {
40
41 /**
42 * Locates and decodes a barcode in some format within an image.
43 *
44 * @param image image of barcode to decode
45 * @return which: string the barcode encodes
46 * @throws NotFoundException if no potential barcode is found
47 * @throws ChecksumException if a potential barcode is found but does not pass its checksum
48 * @throws FormatException if a potential barcode is found but format is invalid
49 */
50 // decode(image: BinaryBitmap): Result /*throws NotFoundException, ChecksumException, FormatException*/
51
52 /**
53 * Locates and decodes a barcode in some format within an image. This method also accepts
54 * hints, each possibly associated to some data, which may help the implementation decode.
55 *
56 * @param image image of barcode to decode
57 * @param hints passed as a {@link Map} from {@link DecodeHintType}
58 * to arbitrary data. The
59 * meaning of the data depends upon the hint type. The implementation may or may not do
60 * anything with these hints.
61 *
62 * @return which: string the barcode encodes
63 *
64 * @throws NotFoundException if no potential barcode is found
65 * @throws ChecksumException if a potential barcode is found but does not pass its checksum
66 * @throws FormatException if a potential barcode is found but format is invalid
67 */
68 decode(image: BinaryBitmap, hints?: Map<DecodeHintType, any> | null): Result;
69
70 /**
71 * Resets any internal state the implementation has after a decode, to prepare it
72 * for reuse.
73 */
74 reset(): void;
75
76}

Callers 14

decodeBitmapMethod · 0.65
decodeInternalMethod · 0.65
decodeByteMethod · 0.65
decodeKanjiMethod · 0.65
decodeBitMatrixMethod · 0.65
correctErrorsMethod · 0.65
decodeMethod · 0.65
decodeMethod · 0.65
decodeBitmapMethod · 0.65
decodeBitmapMethod · 0.65
resetMethod · 0.65
resetMethod · 0.65

Implementers 9

MultiFormatReadersrc/core/MultiFormatReader.ts
MicroQRCodeReadersrc/core/microqr/MicroQRCodeReader.ts
DataMatrixReadersrc/core/datamatrix/DataMatrixReader.t
MaxiCodeReadersrc/core/maxicode/MaxiCodeReader.ts
QRCodeReadersrc/core/qrcode/QRCodeReader.ts
AztecReadersrc/core/aztec/AztecReader.ts
PDF417Readersrc/core/pdf417/PDF417Reader.ts
BrowserCodeReadersrc/browser/BrowserCodeReader.ts
UPCAReadersrc/core/oned/UPCAReader.ts

Calls

no outgoing calls

Tested by

no test coverage detected