Commit graph

1088 commits

Author SHA1 Message Date
Daniel Gredler 2dd6cb43dd
Avoid decoding stacked row 1 of N independently (#1693)
* Avoid decoding stacked row 1 of N independently

* Avoid decoding stacked row 1 of N independently
2023-09-16 08:15:21 -05:00
Daniel Gredler 465753afe6
Avoid 2 more RSS Expanded finder pattern false positive scenarios (#1692) 2023-09-15 10:55:54 -05:00
Daniel Gredler 557b5fcf0e
Update GS1 AIs according to 2023 specification (#1681) 2023-09-04 09:00:50 -05:00
Daniel Gredler 60ae2ed949
Detect RSS Expanded finder pattern false positives by checking sequences (#1680) 2023-09-03 16:16:39 -05:00
Sean Owen aa58f2ec30 Possible fix for obscure corner case in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37868 2023-08-17 15:28:32 -05:00
Himanshu Shukla fc2f1c9b0f
Removing the forced content limit check for Code128Writer.java (#1675)
* Update Code128Writer.java

Removing the force content limit check as per https://github.com/zxing/zxing/issues/1672

* Update Code128Writer.java
2023-08-16 21:56:52 -05:00
Daniel Gredler 254d4df557
Fix MaxiCode handling of vertical quiet zone (#1671) 2023-07-30 12:58:44 -05:00
Daniel Gredler 282f5ba726
Add ResultMetadataType.ERRORS_CORRECTED and ERASURES_CORRECTED (#1657)
* Add ResultMetadataType.ERRORS_CORRECTED and ERASURES_CORRECTED (2D barcodes)

* Maintain existing constructor on AztecDetectorResult

* Maintain existing ReedSolomonDecoder.decode method
2023-06-25 17:30:21 -05:00
primo-ppcg 57ed027468
Make OneDimensionalCodeWriter.encode(content, hints) public (#1659)
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-24 07:42:40 -05:00
primo-ppcg 7880290d25
Allow space in Code128 CodeSet B (#1658)
Space is a valid character in CodeSet B.
2023-06-23 21:54:20 -05:00
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
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 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
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
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