Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MultiFormatReader

MultiFormatReader is a convenience class and the main entry point into the library for most uses. By default it attempts to decode all barcode formats that the library supports. Optionally, you can provide a hints object to request different behavior, for example only decoding QR codes.

author

Sean Owen

author

dswitkin@google.com (Daniel Switkin)

Hierarchy

  • MultiFormatReader

Implements

Index

Properties

Private hints

hints: Map<DecodeHintType, any> | null

Private readers

readers: Reader[]

Methods

decode

  • Decode an image using the hints provided. Does not honor existing state.

    throws

    NotFoundException Any errors which occurred

    Parameters

    • image: BinaryBitmap

      The pixel data to decode

    • Optional hints: Map<DecodeHintType, any> | null

      The hints to use, clearing the previous state.

    Returns Result

    The contents of the image

Private decodeInternal

decodeWithState

  • 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().

    throws

    NotFoundException Any errors which occurred

    Parameters

    Returns Result

    The contents of the image

reset

  • reset(): void

setHints

  • This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls to decodeWithState(image) can reuse the same set of readers without reallocating memory. This is important for performance in continuous scan clients.

    Parameters

    • Optional hints: Map<DecodeHintType, any> | null

      The set of hints to use for subsequent calls to decode(image)

    Returns void

Generated using TypeDoc