Commit graph

1306 commits

Author SHA1 Message Date
Sean Owen 547e58a286 Add support for guessing UTF-16 encoding based on BOM 2021-04-02 11:53:19 -05:00
dehnhard ef498941bf
Symbology Identifier support (#1372)
* decoder support for symbology identifier metadata

Co-authored-by: Daniel Dehnhard <daniel@dehnhard.it>
2021-04-02 07:21:33 -05:00
dehnhard 3bf945e4cf
inverted barcode support (#1371)
* also decodes inverted barcode on hint

Co-authored-by: Daniel Dehnhard <daniel@dehnhard.it>
2021-04-01 17:04:55 -05:00
gitlost 5fb2cf8e96
Aztec Detector::getDimension() fix for layers 27 (131x131) (#1370) 2021-03-17 19:25:26 -05:00
gitlost a7c3516826
Update DMRE versions to ISO/IEC 21471:2020 (#1369) 2021-03-17 18:12:40 -05:00
dehnhard 4426711598
Update dimension ratio change to new location (updates DMRE PR #323) (#1350)
* Update dimension ratio change to new location

* changing threshold to 6

as discussed in #1350
2021-01-19 13:40:59 -06:00
Sean Owen 395dc6b83f Initial support for DMRE 2021-01-15 17:14:02 -06:00
Sean Owen 6dd0776b96 Prevent MaxiCode sampler from sampling off the edge of the image. 2020-12-30 15:44:03 -06:00
Sean Owen fd364d9338 Improve test coverage 2020-12-09 11:29:07 -06:00
Sean Owen e7ed6aee2f Misc dead code cleanup, plugin updates 2020-12-08 11:55:33 -06:00
Dan Lenski 20405981dc
PDF417 detector: try 90 and 270 rotations also (#1333) 2020-11-09 07:29:59 -06:00
Dan Lenski 515688992b
Aztec encode with ECI for non-default character sets (#1330)
* Aztec encoder: add ECI codes according to character set

Added redundant methods to avoid modifying existing tests.

* fix testAztecWriter

- ISO-8859-1 cannot actually encode Euro symbol ('€'); this test case only
  passed before because the Decoder wasn't actually doing the bytes→String
  decode, but simply round-tripping an unknown byte.
- Add extra test cases for implicit ISO-8859-1 (without ECI code), explicit
  ISO-8559-1 (with ECI code), and Shift_JIS

* remove unnecessary conversion between String and byte[] in Aztec EncoderTest and DetectorTest

* Aztec DecoderTest: use constants for charsets

* Aztec Code: remove unnecessary conversion between Charset and Charset.name() strings

* PDF417, QR, DataMatrix: remove unnecessary conversion between Charset and Charset.name() strings

Includes replacing StringUtils.guessEncoding() with .guessCharset(), to return
Charset rather than String.

This change makes the tacit assumption that Shift_JIS charset *will* be
available.  There are existing comments suggesting that it might not always
be available… but the existing *tests* assume it will be.
2020-11-07 16:26:24 -06:00
Dan Lenski 6e349275f7
Aztec Code: decode ECI and FNC1 (#1328)
* 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.
2020-10-27 20:04:41 -05:00
Sean Owen 32158ee504 [maven-release-plugin] prepare for next development iteration 2020-09-29 19:53:40 -05:00
Sean Owen 272d9561b5 [maven-release-plugin] prepare release zxing-3.4.1 2020-09-29 19:53:33 -05:00
Sean Owen cff1a21291 [maven-release-plugin] rollback the release of zxing-3.4.1 2020-09-29 19:50:02 -05:00
Sean Owen c30aa535e7 [maven-release-plugin] prepare release zxing-3.4.1 2020-09-29 19:48:52 -05:00
Sean Owen 06e3cd4967 [maven-release-plugin] rollback the release of zxing-3.4.1 2020-09-29 11:44:20 -05:00
Sean Owen 09f1a7eea2 [maven-release-plugin] prepare for next development iteration 2020-09-29 11:39:45 -05:00
Sean Owen 3eafc5d447 [maven-release-plugin] prepare release zxing-3.4.1 2020-09-29 11:39:38 -05:00
yerar 6fe3a775a0
Make MultiFinderPatternFinder a public class (#1313)
* Make MultiFinderPatternFinder a public class

* Make MultiFinderPatternFinder constructor public

Co-authored-by: Gerard Finol <gfinol@color-sensing.com>
2020-09-14 10:03:09 -05:00
Sean Owen 40c2e2e9af
Many small updates from code analysis; remove unused files; tune server params (#1311) 2020-09-06 18:21:05 -05:00
Sean Owen da049f21d9
Update proguard to 7. Remove unused slf4j. Minor code tweaks and dep updates. (#1307) 2020-08-26 13:09:20 -05:00
Sean Owen 9aa4db5c1f Misc code simplification and edits 2020-06-05 21:34:13 -05:00
Sean Owen c89470b2b0 Issue #862 : avoid invalid codeword from bad EC number estimate 2020-06-03 11:50:14 -05:00
Sean Owen 3c96923276 Minor dep updates 2020-05-13 14:12:53 -05:00
Sean Owen f8df5f0ca2 Avoid tiny Array.sort; a bottleneck 2020-05-13 14:12:34 -05:00
Sean Owen 2e2b5ba757 Resolve issue #1254: overloaded H: for hidden/p2m 2020-01-27 08:33:27 -06:00
Sean Owen 459c0197a7 Plugin updates; misc code simplifications and optimizations 2019-12-11 15:29:49 -06:00
Sean Owen 4e110ecdbb Minor code inspection: Use Math.min, Arrays.fill. No point in keeping opts from J2ME days 2019-07-29 14:36:16 -05:00
Sean Owen 1cc5cbe961 Don't run Aztec test 1000 times pointlessly 2019-07-29 14:33:58 -05:00
Sean Owen 4d94ac22eb Add addition wifi: QR code test case from mailing list 2019-07-29 14:33:58 -05:00
MakKi (makki_d) ae6d7e55af findFinderPattern()[1] points the outside pixel of the finder pattern (#1179) 2019-06-16 10:10:23 -05:00
anrcode 6075d5b2f6 Minor change to enable manual selection of the QR code mask pattern (#1176)
* Minor change to enable manual selection of the QR code mask pattern via encoding hints. Manual selection of the mask pattern greatly improves performance.

* fixed style
2019-06-13 07:02:10 -05:00
Sean Owen 723b65fe3d Refactor checking of write format in 1D writers 2019-05-31 10:53:24 -05:00
MakKi (makki_d) 2d77cec7c8 check format param in CodaBarWriter::encode (#1173) 2019-05-31 10:32:53 -05:00
Sean Owen 8f1a751ea5 [maven-release-plugin] prepare for next development iteration 2019-05-17 19:36:16 -05:00
Sean Owen 67138cedc8 [maven-release-plugin] prepare release zxing-3.4.0 2019-05-17 19:36:09 -05:00
Sean Owen f1683e1f4f Bump to 3.4.0. Require Java 8. Various code simplifications and plugin / dep updates 2019-05-13 18:44:57 -05:00
MakKi (makki_d) 653ac2a3be Improve FinderPatternFinder.selectBestPatterns (#1158)
* rewrite FinderPatternFinder.selectBestPatterns
2019-04-18 06:42:52 -07:00
Sean Gilligan 0e8c46e262 core JAR Automatic-Module-Name: com.google.zxing (#1155)
Add Automatic-Module-Name entry of com.google.zxing
to the core JAR for Java Platform Module System.

See Issue #1154
2019-04-08 07:43:00 -05:00
MakKi (makki_d) fedfa7a16c Remove duplicate results when it has structured append header. (#1147)
* remove duplicate results in processStructuredAppend

* add whitespace

* remove illegal import
2019-03-22 05:51:06 -05:00
Sean Owen bc645c50bb Small fixes, dep updates, removed warning about Android app, made web app params into annotations 2019-03-09 17:18:31 -06:00
fitchfuloffun eb6bea6ed3 Fixing checksum error in UPC-E barcodes (#1130)
* Converting to UPC-A before checking for matching check digits
2019-02-04 08:54:41 -06:00
Sean Owen 9617a90616 Minor updates to plugins and from code inspection 2019-01-25 21:20:56 -06:00
Sean Owen a81dda90ba Small code improvements from inspections 2019-01-19 20:58:09 -06:00
MakKi (makki_d) 6b3bf9ea40 fix typo (#1111) 2018-11-23 05:58:29 -06:00
MakKi (makki_d) 79bdb2c84e Continue in codeset A when character encoded single number or FNC1-4 in Code128Writer (#1108)
* Continue in code A when character encodes FNC1-4 in Code128Writer

* FNC1 in codeset A

* Single number also can continue in codeset A
2018-11-15 09:00:01 -06:00
MakKi (makki_d) e636498b5e Support Full-ASCII in Code93Writer (#1104)
* support extended characters in Code93Writer

* remove redundancy

* add test for convertToExtended

* thanks for review

* fix comment, use package-private for testing
2018-11-09 08:05:07 -06:00
MakKi (makki_d) b31e090239 Optimize code width calculation in Code39Writer (#1103)
Every code39 character has 9 bars containing 3 wide bars, and separated by a white bar.
(9-3)*1 + 3*2 + 1 = 13
2018-11-04 09:57:58 -06:00