| 19 | namespace ZXing::DataMatrix { |
| 20 | |
| 21 | Result Reader::decode(const BinaryBitmap& image) const |
| 22 | { |
| 23 | #ifdef __cpp_impl_coroutine |
| 24 | return FirstOrDefault(decode(image, 1)); |
| 25 | #else |
| 26 | auto binImg = image.getBitMatrix(); |
| 27 | if (binImg == nullptr) |
| 28 | return {}; |
| 29 | |
| 30 | auto detectorResult = Detect(*binImg, _hints.tryHarder(), _hints.tryRotate(), _hints.isPure()); |
| 31 | if (!detectorResult.isValid()) |
| 32 | return {}; |
| 33 | |
| 34 | return Result(Decode(detectorResult.bits()), std::move(detectorResult).position(), BarcodeFormat::DataMatrix); |
| 35 | #endif |
| 36 | } |
| 37 | |
| 38 | #ifdef __cpp_impl_coroutine |
| 39 | Results Reader::decode(const BinaryBitmap& image, int maxSymbols) const |
nothing calls this directly
no test coverage detected