| 21 | namespace ZXing::Aztec { |
| 22 | |
| 23 | Result |
| 24 | Reader::decode(const BinaryBitmap& image) const |
| 25 | { |
| 26 | auto binImg = image.getBitMatrix(); |
| 27 | if (binImg == nullptr) |
| 28 | return {}; |
| 29 | |
| 30 | DetectorResult detectorResult = Detect(*binImg, _hints.isPure(), _hints.tryHarder()); |
| 31 | if (!detectorResult.isValid()) |
| 32 | return {}; |
| 33 | |
| 34 | auto decodeResult = Decode(detectorResult) |
| 35 | .setReaderInit(detectorResult.readerInit()) |
| 36 | .setIsMirrored(detectorResult.isMirrored()) |
| 37 | .setVersionNumber(detectorResult.nbLayers()); |
| 38 | |
| 39 | return Result(std::move(decodeResult), std::move(detectorResult).position(), BarcodeFormat::Aztec); |
| 40 | } |
| 41 | |
| 42 | Results Reader::decode(const BinaryBitmap& image, int maxSymbols) const |
| 43 | { |
nothing calls this directly
no test coverage detected