* 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.
* 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.
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.
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.
I tried to correct some Polish translations that I at least suspected
were erroneous, unclear, and/or awkward. However, my attempts should be
carefully checked by a native speaker.