summaryrefslogtreecommitdiff
path: root/core/src/test/resources
AgeCommit message (Collapse)AuthorFilesLines
2026-05-01Add reader initialization support for Data Matrix and PDF417 (#2069)Daniel Gredler8-0/+6
2026-05-01Add Code 128 reader initialization support (#2068)Daniel Gredler5-0/+4
2026-04-30Add Aztec reader initialization support (#2066)Daniel Gredler7-0/+7
2026-04-08Fix QR decode failure for small/native-size images (#2061)Andrew Szeto1-0/+0
* Fix QR decode failure for small/native-size images (#1976) QRCodeWriter.encode(..., 0, 0) produces a 33x33 native-size QR that ZXing cannot decode. The CENTER_QUORUM filter in selectBestPatterns() (added in 110ef9e to fix #1567) removes finder patterns with count < 2. For small images, the row-skip interval (iSkip=3, MIN_SKIP) means the scanner only crosses the top two finder pattern centers on a single row each, giving them count=1. The bottom-left pattern gets count=2 because it's scanned after iSkip drops to 2. The filter then removes the two count=1 patterns, leaving 1 of the 3 needed, and throws NotFoundException. The fix: only apply the CENTER_QUORUM filter when either (a) at least 3 confirmed patterns would survive, or (b) the total candidate list exceeds a size threshold. This preserves #1567 protection while allowing small images through. Why a size threshold: the filter was added to prevent O(n^3) blowup in the triangle-selection loop when noisy images produce thousands of spurious candidates. When the candidate list is small (<= 25 entries, yielding <= ~2300 loop iterations), the cubic cost is negligible regardless of whether the patterns are real or spurious. A clean single-QR image produces ~3 candidates; even a noisy image below the threshold is computationally trivial. Above the threshold, the filter applies unconditionally, matching today's behavior. Alternatives considered: - Removing the filter entirely: all 561 existing tests pass, but re-opens #1567 for pathological images with thousands of spurious count=1 candidates. - Reducing MIN_SKIP from 3 to 1 for small images: addresses the symptom (more scan rows = higher counts) but doesn't fix the fundamental interaction between iSkip and the quorum filter, and changes scan behavior for all small images. - Fallback (try with filter, retry without on failure): re-opens #1567 whenever fewer than 3 confirmed patterns exist, which is exactly the scenario that produces thousands of unconfirmed candidates in noisy images. * Increase noisy-image test timeout from 5s to 30s GitHub shared runners timed out at 5s. Local measurement shows ~1.2s, implying at least 4x slowdown on CI. 30s gives a comfortable margin while still catching the O(n^3) regression from #1567.
2025-11-11Loosen ITF max variance for 3x module widths (#2014)Daniel Gredler2-0/+1
2023-09-16Avoid decoding stacked row 1 of N independently (#1693)Daniel Gredler2-0/+1
* Avoid decoding stacked row 1 of N independently * Avoid decoding stacked row 1 of N independently
2023-09-15Avoid 2 more RSS Expanded finder pattern false positive scenarios (#1692)Daniel Gredler4-0/+2
2023-09-04Detect RSS Expanded finder pattern false positives by checking sequences (#1680)Daniel Gredler2-0/+1
2023-07-30Fix MaxiCode handling of vertical quiet zone (#1671)Daniel Gredler2-0/+1
2023-06-26Add ResultMetadataType.ERRORS_CORRECTED and ERASURES_CORRECTED (#1657)Daniel Gredler20-0/+17
* Add ResultMetadataType.ERRORS_CORRECTED and ERASURES_CORRECTED (2D barcodes) * Maintain existing constructor on AztecDetectorResult * Maintain existing ReedSolomonDecoder.decode method
2023-05-29Use barcode-specific min height when searching for stop pattern (fixes ↵Daniel Gredler2-0/+1
#1641) (#1642)
2023-05-23Reduce PDF417 variance leniency (fixes #1624) (#1628)Daniel Gredler2-0/+1
2022-07-20Fix Maxicode decoding of CR (carriage return); fixes #1543 (#1544)Daniel Gredler2-0/+1
2021-06-07Fix symbology identifier tests (#1396)MakKi (makki_d)10-0/+1
* rename metadata test files * implement symbology identifier on ITFReader * add metadata test * remove unused code
2021-04-04MaxiCode decoding: add missing NS to Set C (#1375)gitlost2-0/+1
2021-04-02Symbology Identifier support (#1372)dehnhard13-0/+13
* decoder support for symbology identifier metadata Co-authored-by: Daniel Dehnhard <daniel@dehnhard.it>
2021-04-02inverted barcode support (#1371)dehnhard2-0/+1
* also decodes inverted barcode on hint Co-authored-by: Daniel Dehnhard <daniel@dehnhard.it>
2021-03-18Aztec Detector::getDimension() fix for layers 27 (131x131) (#1370)gitlost2-0/+1
2021-03-18Update DMRE versions to ISO/IEC 21471:2020 (#1369)gitlost36-0/+18
2020-10-28Aztec Code: decode ECI and FNC1 (#1328)Dan Lenski1-0/+1
* decode Aztec FLG(n) Per https://en.wikipedia.org/wiki/Aztec_Code#Character_set, FLG(0) → FNC1, FLG(1-6) → ECI identifier Decode FNC1 as 0x1d (ASCII escape character; same as Code128, DataMatrix, others) Not doing anything with ECI yet, but this at least fixes the mis-synchronization of the bit stream that comes from ignoring the bits that follow it. * include ecLevel (percentage) in DecoderResult for Aztec * Aztec decoder: follow character set indicated by ECI codes Modeled on PDF417's DecodedBitStreamParser * add testAztecResultECI and testHighLevelDecode to aztec.decoder.DecoderTest The latter includes non-ECI, ECI, and mixed test cases.
2018-03-15Improve support for Macro PDF417 (#973)Florian Schrag4-0/+2
* Improve support for Macro PDF417 * cleanup and move license to it's proper place * add .editorconfig + proper indentation / add optionalFields array * rename variables and use Arrays instead of System * replaced length with to * restore spaces & switch to package private
2016-09-11More coverage for Code93/39 writers, and for multiple barcode detectionSean Owen1-0/+0
2016-09-11A little more coverage for PDF417 writer and multi QR codeSean Owen1-0/+0
2016-09-10Add more tests to better cover DataMatrix, Maxicode decodingSean Owen16-0/+8
2016-08-08Aztec decoder fix: return to Upper mode after U/S B/S sequence. (#643)fgrieu2-0/+1
* Update Decoder.java * Add files via upload dlusbs.png and dlusbs.txt is a test case for the D/L [digit] U/S B/S sequence, which should end in Upper mode, not Digit mode * Update number of test cases * Comment logic of the fix * Mention fixed issue #642
2016-07-02Crush some PNGs that could benefit from itSean Owen29-0/+0
2015-09-01Ignore additional PDF417 barcode rowsGuenther Grau2-0/+1
Some barcode generators (e.g. Okapi) seem to generate additional barcode rows at the end of the barcode, which can be decoded as valid barcode rows, but actually contain garbage. The barcode metadata states that these additional rows are not part of the barcode. So we ignore those addional rows when parsing the barcode. This could potentially also happen (though quite unlikely) if data after the barcode looks like a barcode row.
2014-02-08Delete old test gen codeSean Owen2-255/+0
2013-12-12Issue 1820 add Code 128 FNC4 supportsrowen2-0/+1
git-svn-id: https://zxing.googlecode.com/svn/trunk@2992 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2013-11-22Move resources to match Maven standard directory structuresrowen@gmail.com2292-0/+1554
git-svn-id: https://zxing.googlecode.com/svn/trunk@2915 59b500cc-1b3d-0410-9834-0bbf25fbcc57