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

Method decodeWithState

src/core/MultiFormatReader.ts:90–96  ·  view source on GitHub ↗

* Decode an image using the state set up by calling setHints() previously. Continuous scan * clients will get a large speed increase by using this instead of decode(). * * @param image The pixel data to decode * @return The contents of the image * * @throws NotFo

(image: BinaryBitmap)

Source from the content-addressed store, hash-verified

88 * @throws NotFoundException Any errors which occurred
89 */
90 public decodeWithState(image: BinaryBitmap): Result {
91 // Make sure to set up the default state so we don't crash
92 if (this.readers === null || this.readers === undefined) {
93 this.setHints(null);
94 }
95 return this.decodeInternal(image);
96 }
97
98 /**
99 * This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls

Callers 1

decodeBitmapMethod · 0.80

Calls 2

setHintsMethod · 0.95
decodeInternalMethod · 0.95

Tested by

no test coverage detected