Commit graph

1136 commits

Author SHA1 Message Date
Sean Owen c2eb20d976 Compute locale-specific expected date strings in test for JDK 9 compatibility 2016-05-23 07:18:48 -05:00
Taneli Huuskonen cc16a72c85 Simplified some code (#596)
* Fixed bug #593

Bug #593 was misleadingly reported as pertaining to another project, but
testing revealed it affected this project as well.  The Code128 encoding
algorithm failed when an odd number of digits were followed by FNC1 and
other digits.  The code selection algorithm was rewritten.  A test case
showing the bug was added, and an old test case was updated to expect
the result of the new algorithm  -  another valid encoding of the same
length as the old one.

* Fixed bug #593

Bug #593 was misleadingly reported as pertaining to another project, but
testing revealed it affected this project as well.  The Code128 encoding
algorithm failed when an odd number of digits were followed by FNC1 and
other digits.  The code selection algorithm was rewritten.  A test case
showing the bug was added, and an old test case was updated to expect
the result of the new algorithm  -  another valid encoding of the same
length as the old one.

* Cleaning up

Added a private enum and changed some names to improve readability.
Also some trivial cosmetic changes.

* Further cleanup of Code128 writer test

Removed a private one-liner method used exactly once, alphabetized
imports.

* Simplify conversion RGB -> luminance

Removed testing every pixel for greyness in RGBLuminanceSource, as it
did not appreciably change the speed of converting a greyscale image and
slowed down the conversion of a colour image by a few percent.  Besides,
there was no need to treat every row separately; the total number of
pixels was enough.

* Minor improvements to BitArray

Simplified some code, added more accurate error checking, and corrected
small inaccuracies in comments.
2016-05-12 10:06:04 +01:00
Taneli Huuskonen f0dfcdfed5 Fix for bug #593
* Fixed bug #593

Bug #593 was misleadingly reported as pertaining to another project, but
testing revealed it affected this project as well.  The Code128 encoding
algorithm failed when an odd number of digits were followed by FNC1 and
other digits.  The code selection algorithm was rewritten.  A test case
showing the bug was added, and an old test case was updated to expect
the result of the new algorithm  -  another valid encoding of the same
length as the old one.

* Fixed bug #593

Bug #593 was misleadingly reported as pertaining to another project, but
testing revealed it affected this project as well.  The Code128 encoding
algorithm failed when an odd number of digits were followed by FNC1 and
other digits.  The code selection algorithm was rewritten.  A test case
showing the bug was added, and an old test case was updated to expect
the result of the new algorithm  -  another valid encoding of the same
length as the old one.

* Cleaning up

Added a private enum and changed some names to improve readability.
Also some trivial cosmetic changes.

* Further cleanup of Code128 writer test

Removed a private one-liner method used exactly once, alphabetized
imports.
2016-05-08 15:01:41 +01:00
Sean Owen 84d08ef61f Revert inadvertent change to non-private API 2016-05-08 09:30:51 +01:00
Sean Owen 30bb62bf4f Minor changes from inspection 2016-05-08 09:13:41 +01:00
Taneli Huuskonen ee48b3e5d3 Cleaned up previous commit
Following Sean Owen's suggestions, I cleaned up my code in the Aztec
decoder and its tests as follows:

1. Made convertBoolArrayToByteArray() package-private.
2. Replaced my own assertEqualByteArrays() with existing
   assertArrayEquals().
3. Replaced C-style array declarations with more Javaish ones.
2016-05-05 21:58:37 +03:00
Taneli Huuskonen e9896d03a6 Aztec decoder returns raw bytes
The Aztec decoder now packs the code bits into bytes and returns them as
"raw bytes", even though the error correction codes and stuffing have
been already removed.  Also added a couple of tests for the byte-packing
function.
2016-05-05 15:10:44 +03:00
Alex Hatzenbuhler 8b53e448db Fix spelling mistake in error message 2016-04-20 14:50:35 -05:00
Sean Owen 308d91de1c Update plugins, dependencies, and clean up small code inspection issues 2016-01-21 14:46:48 +01:00
Kbhredsox 79b8454186 Update ITFWriter.java
Fixed spelling of text within "invalid input" exception.
2015-12-02 19:05:48 -05:00
sato yoshiyuki 585f77bf39 QRCode Encoder: Support NUMERIC/ALPHANUMERIC Mode in Shift_JIS 2015-12-03 00:12:43 +09:00
Sean Owen 9910fcfaa9 Closes issue #496 : correct checksum for certain Code 39 inputs 2015-11-11 09:37:13 +00:00
mmagician 9cf93792d4 Added a Code 93 encoder 2015-10-18 23:39:03 +01:00
Sean Owen a6707cb440 Alter many encode hints to accept String equivalents 2015-10-05 14:13:17 +01:00
wood a2159ed0f4 change the comment
Change the comment
2015-10-02 00:23:07 +08:00
Sean Owen e0ea32f217 Fix two rare crashes from bad input / state 2015-09-22 22:24:38 +01:00
RX1226 17676d064a Add support encoding UPC-E format 2015-09-04 21:59:41 +08:00
Guenther Grau 825a31e4b5 Ignore additional PDF417 barcode rows
Some barcode generators (e.g. Okapi) seem to generate additional barcode
rows at the end of the barcode, which can be decoded as valid barcode
rows, but actually contain garbage. The barcode metadata states that
these additional rows are not part of the barcode. So we ignore those
addional rows when parsing the barcode. This could potentially also
happen (though quite unlikely) if data after the barcode looks like a
barcode row.
2015-09-01 14:12:17 +02:00
Sean Owen 585667bc31 [maven-release-plugin] prepare for next development iteration 2015-08-19 13:21:05 +01:00
Sean Owen e641a9c36b [maven-release-plugin] prepare release zxing-3.2.1 2015-08-19 13:21:00 +01:00
Sean Owen 4dd053a919 Merge pull request #441 from gredler/pdf417-error-correction-level
PDF417Writer shouldn't ignore ERROR_CORRECTION hint
2015-08-14 08:07:49 +01:00
Daniel Gredler 53875e4fd3 PDF417Writer shouldn't ignore ERROR_CORRECTION hint 2015-08-13 21:21:26 -04:00
Sean Owen c1c2fcfbb0 Issue #428 Fix Code 93 escapes above %F 2015-07-21 11:09:24 +01:00
Andreas Wenger cc1a7aa86a Set PDF_417 lineThickness to 1
- fine-grained scaling for PDF_417 generation
2015-07-15 15:51:24 +02:00
Sean Owen 3b8ab085d8 Merge pull request #412 from strguntbr/multibyteFix
Fixed substring call
2015-07-02 17:15:42 +01:00
Marcus Winkler 18a72279dd Added unittest for PDF417 encoder using ISO-8859-1 with special chars 2015-07-02 17:55:00 +02:00
Marcus Winkler e31ac261e3 Fixed substring call 2015-07-02 17:15:11 +02:00
Sean Owen 02d3697a59 Remove spurious stack trace from singleton exception, and various minor edits 2015-06-06 10:46:18 +01:00
Sean Owen ea9a260f0a Fix javadoc 8 error; actually enable enforcer; update plugins 2015-05-25 23:54:50 +01:00
Marcus Winkler 849f81354c Fixed multibyte charset problem when encoding PDF417 with Compaction AUTO 2015-05-20 13:01:26 +02:00
Marcus Winkler 060010253c Added unit test for multibyte problem 2015-05-20 13:00:38 +02:00
Sean Owen 8bae23a923 Revert another change that causes a whirr failure, fix rat warnings, and one more error on Android generated files 2015-05-15 16:23:18 +01:00
Sean Owen 867d580e66 Enable RAT check in build; enable checkstyle; fix some violations; update Jetty/Android plugin 2015-05-15 15:44:45 +01:00
Sean Owen ec9487c0b2 Fixes from coverity 2015-05-13 13:04:43 +01:00
Sean Owen 560cba85b0 Update plugins (now requires Maven 3.2); fix javadoc warning 2015-05-03 20:49:10 +01:00
Sean Owen 721723ecee Revert "minSize from provided sizes" 2015-05-03 20:47:43 +01:00
Sean Owen 8475bf6fd2 Remove system-dependent line separator logic in BitMatrix 2015-02-23 16:08:44 +00:00
Sean Owen e4bb497942 [maven-release-plugin] prepare for next development iteration 2015-02-15 12:48:15 +00:00
Sean Owen adfc4097ad [maven-release-plugin] prepare release zxing-3.2.0 2015-02-15 12:48:10 +00:00
Sean Owen 625d9b77d7 Additional fix for issue #300 (HT micjahn) 2015-02-06 21:39:28 +00:00
Sean Owen 4b02337709 Issue #300 : simplify X12 encodation at end of input stream to fix unlatch issue. HT micjahn 2015-02-04 07:45:35 -06:00
Bo Xu cfeb6758db Fix PDF417 numeric encoding grouping index check 2015-01-15 12:01:49 -08:00
Sean Owen 0fc1a267c0 Tiny fixes from coverity; fix SuppressWarnings for deprecation; just one Java 7 build now 2015-01-11 16:15:14 +00:00
Sean Owen 51bee78535 Supplement for #271 to deprecate alternative min/max size hint 2014-12-17 21:59:35 +00:00
Zavael ea00f5a51c minSize from provided sizes
create minSize Dimension from provided width and height
2014-12-17 15:41:33 +01:00
Sean Owen ce1fbe1b76 Cleanups while looking at issue #268 2014-12-13 17:13:39 +00:00
Sean Owen 344d55e688 Closes #262 : fix parsing of Data Matrix with dimension >= 144 2014-12-04 16:45:48 -06:00
Sean Owen d876b3e178 Follow up on commit for issue #242 2014-10-30 21:40:02 +00:00
Mark b04edfec68 squash changes 2014-10-27 18:35:26 +01:00
Sean Owen 79bd5f585e Add simple test for PDF417 high level encoder 2014-10-06 23:01:40 +01:00