summaryrefslogtreecommitdiff
path: root/core/src
AgeCommit message (Collapse)AuthorFilesLines
2023-06-26Add ResultMetadataType.ERRORS_CORRECTED and ERASURES_CORRECTED (#1657)Daniel Gredler41-53/+179
* Add ResultMetadataType.ERRORS_CORRECTED and ERASURES_CORRECTED (2D barcodes) * Maintain existing constructor on AztecDetectorResult * Maintain existing ReedSolomonDecoder.decode method
2023-06-24Make OneDimensionalCodeWriter.encode(content, hints) public (#1659)primo-ppcg2-2/+2
This method is useful for encoding Code128 with a specific code set to a bool array. As no other class overrides this method, this change only affects Code128Writer. I don't know that there's a strong argument against making this method public. With this method protected, it is necessary to first encode as a BitMatrix, extract the first row, and the convert the resulting BitArray to a bool array. This all can be avoided if the method is made public.
2023-06-24Allow space in Code128 CodeSet B (#1658)primo-ppcg1-1/+1
Space is a valid character in CodeSet B.
2023-05-29Use barcode-specific min height when searching for stop pattern (fixes ↵Daniel Gredler4-8/+17
#1641) (#1642)
2023-05-23Reduce PDF417 variance leniency (fixes #1624) (#1628)Daniel Gredler4-6/+7
2023-05-23Enable supported ECI charsets dynamically (#1625)Daniel Gredler2-12/+15
* Enable supported ECI charsets dynamically * Remove use of Java 9+ API * Remove property-based override for dynamic ECI charsets
2023-04-05Clarify that the size of the GF is a power of two (#1612)Frederik van der Els1-9/+10
2023-03-23fix: 1358 - rolled back to old-fashioned Collections.sort for android 23 (#1595)monsieurtanuki1-1/+5
cf. https://developer.android.com/reference/java/util/List#sort(java.util.Comparator%3C?%20super%20E%3E), "added in API level 24"
2022-11-01Filter unconfirmed QR code finder patterns before testing triangles to avoid ↵Sean Owen4-3/+10
long-running analysis. Closes #1567
2022-10-20Various code tweaks, action updates, dep updatesSean Owen7-50/+50
2022-09-24Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38486#c10Sean Owen1-4/+20
2022-09-20Handle case where GB2312 isn't supported; don't support Hanzi mode QR codes ↵Sean Owen2-1/+16
in this case
2022-08-18Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50397Sean Owen1-0/+3
2022-08-18Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50388Sean Owen1-5/+7
2022-07-20Add basic support for thread interruption, and add protection for long ↵Sean Owen1-0/+6
running requests in web app
2022-07-20Fix Maxicode decoding of CR (carriage return); fixes #1543 (#1544)Daniel Gredler4-1/+40
2022-07-06Misc dependency updatesSean Owen2-1/+4
2022-07-06In multi QR code finder, only consider multiply-confirmed centers as ↵Sean Owen2-2/+7
intended, to avoid extreme amounts of computation in large images without barcodes
2022-05-16Micro optimization to maybe help ↵Sean Owen1-21/+21
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47419
2022-05-06Prevent encoding of the empty string for PDF417 (#1523)AlexGeller12-0/+10
* Added code so that the PDF417 encoder throws an exception when attempting to encode the empty string
2022-05-05Adds orientation of pdf417 barcode to Result metadata (#1522)Jordan Wild4-13/+57
* Adds orientation of pdf417 barcode to Result metadata Co-authored-by: Jordan Wild <jwild@simplenexus.com>
2022-05-01Fix last javadoc fixSean Owen1-1/+1
2022-05-01Fix javadoc warnings from last releaseSean Owen1-1/+21
2022-04-27Replacing non ISO-8859-1 characters in PDF417 input with '?' (#1514)AlexGeller11-0/+9
* Replacing non ISO-8859-1 characters in input with '?' when neither a character set nor multi-eci encoding is selected. * Changed code to raise an exception for characters not encodeable in ISO-8859-1
2022-03-13Share the ECI string builder of the data matrix decoder with the PDF417 ↵AlexGeller13-147/+139
decoder (#1508) * Shared the ECI string builder of the datamatrix decoder with the PDF417 decoder
2022-03-09Add multi-eci decoding for PDF417 (#1507)AlexGeller14-149/+195
* - Added multi-eci decoding for PDF417 - Fixed issue that some multi-eci encoded PDF417 codes were missing ECIs * Syntactic changes * - Fixed issue that ECIs were not processed correctly in all allowed locations in binary encoded data as specified in section 5.5.3.2 of the spec - Added verifying unit test
2022-03-05Add support for multi-eci encoding for PDF417 (#1506)AlexGeller111-328/+858
* - Added multi-eci encoding for PDF417 - Fixed issue that the PDF417 decoder incorrectly decoded input with a leading ECI and no explicit latch to TEXT encoding
2022-03-03BitArray perf improvement, possibly addressing ↵Sean Owen1-4/+7
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45189
2022-03-02Adding more PDF417 decoding tests (#1504)AlexGeller12-0/+198
* Added more PDF417 decoding tests
2022-02-27Fix bug #1502 that PDF417 barcodes without initial latch to Text compaction ↵AlexGeller11-8/+2
mode fail to decode (#1503) * Fixed bug that barcodes without initial latch to text encoding failed to decode
2022-02-17Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44778Sean Owen1-20/+29
2022-02-17Minor code changes to previous PR mergesSean Owen6-191/+106
2022-01-26Added option to force C40 encoding in data matrix (#1495)AlexGeller14-6/+80
* Added option FORCE_C40 * Restored original public API * Improved javadoc for EncodeHintType.FORCE_C40 * More javadoc fixes
2022-01-26Fixed IllegalArgumentException in ErrorCorrection.encodeECC200 cause by the ↵AlexGeller12-17/+44
minimal encoder not adding padding (#1496)
2022-01-20Minimal encoding for Code-128 (2nd, less intrusive version) (#1484)AlexGeller13-21/+356
* 2nd version of Code128 minimal encoding.
2022-01-18Probable fix for AIOOBE from ↵Sean Owen1-1/+1
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43765
2022-01-12Add ReaderException.setStackTraceSean Owen1-1/+12
2022-01-12Minimal encoding for Data Matrix with multi ECI and GS1-FNC1 support (2nd) ↵AlexGeller17-121/+1683
(#1479) * Added Data Matrix minimal encoding with multi-ECI and GS1-FNC1 support. * Added support for MACRO-5 and MACRO-6 * Improved comment
2022-01-11Add isStackTrace support to NotFoundExceptionSean Owen1-1/+1
2022-01-05Add support for multiple character-ECIs in data matrix decoder (#1474)AlexGeller11-7/+106
* Added support for multiple character-ECIs * - Changed from ArrayList<Byte> to ByteArrayOutputStream - Added blank lines * Improved performance for the general case (without ECI)
2021-12-08Simplified code, improved memory usage and performance of the QR-Code ↵AlexGeller11-29/+11
minimal encoder. (#1465) * Simplified code, improved memory usage and performance. * Simplified code
2021-11-16Fix of error in specification ISO/IEC 16022 Second edition Annex P as ↵AlexGeller12-0/+47
suggested by Martin Burke of zint (See https://sourceforge.net/p/zint/code/ci/68566fefd2a4623041b0232a5941f8fed1e22018/) (#1459) Quote of Martin's proposed changes to the spec: The algorithm can be salvaged to be at least sound by making those changes, e.g. by adding to step e): "1) If the next character cannot be encoded as X12, switch to ASCII mode and go to step b)." (and renumbering the following sub-steps). Similarly step f): "1) If the next character cannot be encoded as EDIFACT, switch to ASCII mode and go to step b)."
2021-11-11Fix bug624: Illegal Character Exception (#1454)AlexGeller12-24/+34
* - added code to suppress the terminator if the capacity of the version is less than 4 bit - added test case * - Removed code in MinimalEncoder that added Mode.TERMINATOR (is taken care of in Encoder.terminateBits) - Removed the corresponding test case * Updated test cases * Improved documentation * Changed documentation to not use an example with an unsupported character encoding * Improved wording of comment * - Simplified code - Added space after comma in several places * Added support for more character sets supported by CharacterSetECI * Syntactic enhancements * Changed instantiation of generic types to diamond style * Updated documentation of the QR_COMPACT hint to explain the impact of setting the CHARACTER_SET hint . * Changed whitespace * Removed comment * Fixed typos in comments * Added text cases for KANJI and Shift_JS encoding * Improved comments on Japanese language test cases * Fixed bug * Compacted code slightly * Whitespace changes * Deepend indent
2021-10-22Minor code tweaksSean Owen1-32/+24
2021-10-21Compact QR-Code: Support more character sets (in particular cp1256 (Arabic) ↵AlexGeller14-60/+95
and Shift-JIS) (#1453) * - added code to suppress the terminator if the capacity of the version is less than 4 bit - added test case * - Removed code in MinimalEncoder that added Mode.TERMINATOR (is taken care of in Encoder.terminateBits) - Removed the corresponding test case * Updated test cases * Improved documentation * Changed documentation to not use an example with an unsupported character encoding * Improved wording of comment * - Simplified code - Added space after comma in several places * Added support for more character sets supported by CharacterSetECI * Syntactic enhancements * Changed instantiation of generic types to diamond style * Updated documentation of the QR_COMPACT hint to explain the impact of setting the CHARACTER_SET hint . * Changed whitespace * Removed comment * Fixed typos in comments * Added text cases for KANJI and Shift_JS encoding * Improved comments on Japanese language test cases
2021-10-19Compacted QR-code: remove needless adding of Mode.TERMINATOR (is taken care ↵AlexGeller13-151/+120
of in Encoder.terminateBits) (#1452) * - added code to suppress the terminator if the capacity of the version is less than 4 bit - added test case * - Removed code in MinimalEncoder that added Mode.TERMINATOR (is taken care of in Encoder.terminateBits) - Removed the corresponding test case * Updated test cases * Improved documentation * Changed documentation to not use an example with an unsupported character encoding * Improved wording of comment * - Simplified code - Added space after comma in several places
2021-10-17Add support for EncodeTypeHint.CHARACTER_SET for compacted QR-Codes (#1450)AlexGeller13-280/+299
* Added experimental version of QR-Code compaction which can be activated via EncodeHintType.QR_COMPACT * - Changed algorithm from recursive divide and conquer to iterative Dijkstra - Performed the requested modifications. * Added better debug output and better documententation of the algorithm * - Added missing error handling in case of a failing assert - Fixed typo in the documentation * Fixed bug that the minimal encoder would fail with an internal error if the string to encode contained only characters from ISO-8859-1 and on or more character that is not defined in any of the ISO-8859 characters sets. * Added unit tests * - indented class and method comments - fixed code indententation - added vertical spacing in statement lists to separate locical blocks - added comments to document some numeric constants - commented out debug logging - made class ResultNode final and all but the methods called by the class Encoder private. * - Fixed indentation and line length - Improved comments * Fixed line length * Improved comments * - Whitespace and comment style changes - Replaced string concatentation with StringBuilder.append() - Replaced Vector with ArrayList - Made members that are ony modified in the constructor final - Made other minor changes * - Made more members final - replaced assert by throwing an IllegalStateException * Changed internal data representation to be based on java.util.LinkedList * Removed uneccessary spaces and comments * Improved the debug output (now produces a compacted graph) * - Added code to exclude not supported ECIs - Fixed regression that bits were incorrectly computed * - Fixed regression that bits were wrongly computed - Improved compaction - added a commented proposal for unit test that makes use of the decoder to validate the encoded bits * Removed useless comparisons * Removed commented code * Optimization: added code to cache the value of LinkedList.size(). * Added more test cases * - Added support for EncodeTypeHint.CHARACTER_SET - Added support to encode in all ISO-8859 character sets available on the platform - Removed code that handles failing asserts * - Replaced string switch case with HashMap lookup - Reintroduced asserts * - Replaced <code> with {@code} - Changed indentation in comment - Simplified code * Improved documentation * Added comment about decoding compatibility with zxing. * - Made MinimalEncoder responsible of ensuring that the bits fit in the returned version. - Removed asserts that throw NPE in case of falure. * Restricted encoder to use only encodings defined in CharacterSetECI * Improved clarity and readability of the algorithm and of the datastrutures used. - Minimizing algorithm is based on immutable edges - ResultList now contains exaclty one ResultNode per mode and possibly several as before * Changed unit tests (forgotten in previous push)
2021-10-13Minor code style updates to MinimalEncoder and a few other files ; minor dep ↵Sean Owen3-358/+157
updates
2021-10-12Fix qr compaction (#1449)AlexGeller12-158/+183
* - Added missing error handling in case of a failing assert - Fixed typo in the documentation * Fixed bug that the minimal encoder would fail with an internal error if the string to encode contained only characters from ISO-8859-1 and on or more character that is not defined in any of the ISO-8859 characters sets.
2021-10-11Fix javadoc errorSean Owen1-1/+1