* 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
| 37 | * @author dswitkin@google.com (Daniel Switkin) |
| 38 | */ |
| 39 | interface 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 | } |
no outgoing calls
no test coverage detected