Commit graph

1415 commits

Author SHA1 Message Date
cdcarloschacon 539733e5c9
Promote renderResult method to public (#1801)
This small commit makes public the "renderResult" method of the
"QRCodeWriter" class.

    The reason to promote this method as public is that I'm facing
Business Case where, besides of generating the QR code as a PNG image,
I also need to print information about the QR code itself (specifically,
the QR version). Navigating through the code of zxing library, I noticed
that the com.google.zxing.qrcode.encoder.Encoder allows me to have that
(the QR metadata); however, by invoking that class I only have part of
the equation (the QRCode DTO) ... I'm still needing to generate the
BitMatrix in order to produce the QR image.

    Here, I have two alternatives: either I invoke the Encoder.encode
class by myself and repeat the same logic when invoking the
QRCodeWriter.encode method; or I make the renderResult Public, call the
Encoder.encode and then I proceed to call the QRCodeWriter.renderResult
method with the previous result.
2024-05-01 23:11:39 -05:00
cinsttool accc4d5ead
fix container inefficiency in RSSExpandedReader.java (#1782) 2024-04-02 07:14:21 -05:00
Sean Owen 90dae90f63 [maven-release-plugin] prepare for next development iteration 2024-01-30 18:37:17 -06:00
Sean Owen f0f1a94439 [maven-release-plugin] prepare release zxing-3.5.3 2024-01-30 18:37:15 -06:00
Blake 1cf9eaaeba
Support for platforms where SJIS is unavailable (#1747)
* Add support for embedded JREs where SJIS isn't available

(cherry picked from commit 67896f97042f5a9772f0ebcfdbb91f275d86e087)

* Add support for embedded JREs where EUC_JP isn't available

(cherry picked from commit 979d3b648982b151b7a1e779e58d445086911b31)
2024-01-17 06:49:19 -06:00
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
Sean Owen 73e2a7c7df [maven-release-plugin] prepare for next development iteration 2023-07-29 20:46:30 -05:00
Sean Owen e86cde829b [maven-release-plugin] prepare release zxing-3.5.2 2023-07-29 20:46:26 -05:00
Sean Owen 41ab68fccf [maven-release-plugin] rollback the release of zxing-3.5.2 2023-07-29 20:43:22 -05:00
Sean Owen 8efbbcd188 [maven-release-plugin] prepare for next development iteration 2023-07-29 20:36:52 -05:00
Sean Owen 0e8eb0dd49 [maven-release-plugin] prepare release zxing-3.5.2 2023-07-29 20:36:47 -05:00
Sean Owen a35ae174ec [maven-release-plugin] rollback the release of zxing-3.5.2 2023-07-29 20:29:30 -05:00
Sean Owen 72628afca6 [maven-release-plugin] prepare for next development iteration 2023-07-29 19:56:45 -05:00
Sean Owen f63d60226a [maven-release-plugin] prepare release zxing-3.5.2 2023-07-29 19:56:42 -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
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