Commit graph

1392 commits

Author SHA1 Message Date
Daniel Gredler 1ab0326bd5
Use barcode-specific min height when searching for stop pattern (fixes #1641) (#1642) 2023-05-28 19:10:32 -05:00
Daniel Gredler 72f5ee7bb9
Reduce PDF417 variance leniency (fixes #1624) (#1628) 2023-05-22 23:23:48 -05:00
Daniel Gredler b892c401c9
Enable supported ECI charsets dynamically (#1625)
* Enable supported ECI charsets dynamically

* Remove use of Java 9+ API

* Remove property-based override for dynamic ECI charsets
2023-05-22 17:53:35 -05:00
Sean Owen 1d2379df34 Regular plugin updates 2023-04-25 13:33:03 -05:00
Frederik van der Els fc4433ba3c
Clarify that the size of the GF is a power of two (#1612) 2023-04-04 16:08:58 -05:00
monsieurtanuki f3c2b44e35
fix: 1358 - rolled back to old-fashioned Collections.sort for android 23 (#1595)
cf. https://developer.android.com/reference/java/util/List#sort(java.util.Comparator%3C?%20super%20E%3E), "added in API level 24"
2023-03-23 12:48:54 -05:00
Sean Owen deb67272cf [maven-release-plugin] prepare for next development iteration 2022-11-01 21:54:14 -05:00
Sean Owen bb75858c9b [maven-release-plugin] prepare release zxing-3.5.1 2022-11-01 21:52:44 -05:00
Sean Owen 110ef9e8f2 Filter unconfirmed QR code finder patterns before testing triangles to avoid long-running analysis. Closes #1567 2022-11-01 14:43:07 -05:00
Sean Owen 0ea0ecddc5 Various code tweaks, action updates, dep updates 2022-10-20 14:13:34 -05:00
Sean Owen fa19d4758f Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38486#c10 2022-09-24 09:23:49 -05:00
Sean Owen a6273e3bc7 Handle case where GB2312 isn't supported; don't support Hanzi mode QR codes in this case 2022-09-20 12:53:06 -05:00
Sean Owen e21bcbb2f8 Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50397 2022-08-18 12:16:15 -05:00
Sean Owen 7fe6d3c108 Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50388 2022-08-18 08:42:06 -05:00
Sean Owen 45df470227 Add basic support for thread interruption, and add protection for long running requests in web app 2022-07-20 13:29:55 -05:00
Daniel Gredler 8ecde0088f
Fix Maxicode decoding of CR (carriage return); fixes #1543 (#1544) 2022-07-19 18:12:52 -05:00
Sean Owen 5231442ebc Misc dependency updates 2022-07-06 13:16:34 -05:00
Sean Owen 78c2a9c440 In multi QR code finder, only consider multiply-confirmed centers as intended, to avoid extreme amounts of computation in large images without barcodes 2022-07-05 18:34:45 -05:00
Sean Owen 75dbbb00dd Micro optimization to maybe help https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47419 2022-05-16 09:28:47 -05:00
AlexGeller1 78faea8058
Prevent encoding of the empty string for PDF417 (#1523)
* Added code so that the PDF417 encoder throws an exception when attempting to encode the empty string
2022-05-05 18:01:14 -05:00
Jordan Wild c7a7b30f04
Adds orientation of pdf417 barcode to Result metadata (#1522)
* Adds orientation of pdf417 barcode to Result metadata

Co-authored-by: Jordan Wild <jwild@simplenexus.com>
2022-05-04 18:57:36 -05:00
Sean Owen 4a6e03079b Fix last javadoc fix 2022-05-01 14:16:46 -06:00
Sean Owen 09e4a5824b Fix javadoc warnings from last release 2022-05-01 10:51:35 -06:00
Sean Owen ea779f0639 [maven-release-plugin] prepare for next development iteration 2022-05-01 10:16:17 -06:00
Sean Owen eb76d0283c [maven-release-plugin] prepare release zxing-3.5.0 2022-05-01 10:16:15 -06:00
Sean Owen 939632072f Minor dep updates 2022-04-30 13:28:04 -06:00
AlexGeller1 5f20b8d095
Replacing non ISO-8859-1 characters in PDF417 input with '?' (#1514)
* 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-04-27 09:46:49 -05:00
AlexGeller1 8265242784
Share the ECI string builder of the data matrix decoder with the PDF417 decoder (#1508)
* Shared the ECI string builder of the datamatrix decoder with the PDF417 decoder
2022-03-13 09:40:09 -05:00
AlexGeller1 ce1a1a53cf
Add multi-eci decoding for PDF417 (#1507)
* - 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-09 08:24:37 -06:00
AlexGeller1 92854d4a55
Add support for multi-eci encoding for PDF417 (#1506)
* - 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-05 08:07:37 -06:00
Sean Owen 4bd257e8c5 BitArray perf improvement, possibly addressing https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45189 2022-03-03 10:11:45 -06:00
AlexGeller1 9460f0620a
Adding more PDF417 decoding tests (#1504)
* Added more PDF417 decoding tests
2022-03-02 08:27:40 -06:00
AlexGeller1 427ece8ae7
Fix bug #1502 that PDF417 barcodes without initial latch to Text compaction mode fail to decode (#1503)
* Fixed bug that barcodes without initial latch to text encoding failed to decode
2022-02-27 08:27:24 -06:00
Sean Owen 87f540f5bd Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44778 2022-02-17 14:38:17 -06:00
Sean Owen 29fbff0802 Minor code changes to previous PR merges 2022-02-17 14:14:37 -06:00
Sean Owen f3f73b47d3 Update to 3.5.0-SNAPSHOT for next release; deps updates 2022-02-17 14:10:00 -06:00
AlexGeller1 13465b3f1c
Added option to force C40 encoding in data matrix (#1495)
* Added option FORCE_C40

* Restored original public API

* Improved javadoc for EncodeHintType.FORCE_C40

* More javadoc fixes
2022-01-26 09:47:18 -06:00
AlexGeller1 39440b3015
Fixed IllegalArgumentException in ErrorCorrection.encodeECC200 cause by the minimal encoder not adding padding (#1496) 2022-01-25 17:20:02 -06:00
AlexGeller1 94fb277607
Minimal encoding for Code-128 (2nd, less intrusive version) (#1484)
* 2nd version of Code128 minimal encoding.
2022-01-20 12:25:45 -06:00
Sean Owen 10d6b08fc6 Probable fix for AIOOBE from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43765 2022-01-18 14:29:46 -06:00
Sean Owen b30da44d01 Add ReaderException.setStackTrace 2022-01-12 14:18:32 -06:00
AlexGeller1 ab23778d4b
Minimal encoding for Data Matrix with multi ECI and GS1-FNC1 support (2nd) (#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-12 11:58:24 -06:00
Sean Owen 491006ac3b Add isStackTrace support to NotFoundException 2022-01-11 10:48:24 -06:00
AlexGeller1 c4266bf09c
Add support for multiple character-ECIs in data matrix decoder (#1474)
* Added support for multiple character-ECIs

* - Changed from ArrayList<Byte> to ByteArrayOutputStream
- Added blank lines

* Improved performance for the general case (without ECI)
2022-01-05 09:32:36 -06:00
AlexGeller1 9b972bbb07
Simplified code, improved memory usage and performance of the QR-Code minimal encoder. (#1465)
* Simplified code, improved memory usage and performance.

* Simplified code
2021-12-08 09:11:04 -06:00
AlexGeller1 21eb978d67
Fix of error in specification ISO/IEC 16022 Second edition Annex P as suggested by Martin Burke of zint (See 68566fefd2/) (#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-15 18:25:31 -06:00
AlexGeller1 c25029d29a
Fix bug624: Illegal Character Exception (#1454)
* - 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-11-11 08:23:33 -06:00
Sean Owen 6c034f9775 Minor code tweaks 2021-10-21 23:38:11 -05:00
AlexGeller1 2e22d09479
Compact QR-Code: Support more character sets (in particular cp1256 (Arabic) 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-21 10:10:28 -05:00
AlexGeller1 c729abe393
Compacted QR-code: remove needless adding of Mode.TERMINATOR (is taken care 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-19 08:47:58 -05:00