Commit graph

352 commits

Author SHA1 Message Date
kev.sully e851b8d293 ISSUE: http://code.google.com/p/zxing/issues/detail?id=110
Added more test cases for ITF.

git-svn-id: https://zxing.googlecode.com/svn/trunk@746 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-20 17:28:52 +00:00
kev.sully b0ef487b31 ISSUE: http://code.google.com/p/zxing/issues/detail?id=110
Renamed ITF14Reader to ITFReader. ITFReader now reads arbitrary number of digits. Added a QuietZone check. Removed checksum validation. Added more test cases.

git-svn-id: https://zxing.googlecode.com/svn/trunk@745 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-20 17:27:12 +00:00
kev.sully 233ae565fe ISSUE: http://code.google.com/p/zxing/issues/detail?id=110
Renamed ITF14Reader to ITFReader. ITFReader now reads arbitrary number of digits. Added a QuietZone check. Removed checksum validation. Added more test cases.

git-svn-id: https://zxing.googlecode.com/svn/trunk@744 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-20 17:26:34 +00:00
srowen 4928f6bd07 git-svn-id: https://zxing.googlecode.com/svn/trunk@743 59b500cc-1b3d-0410-9834-0bbf25fbcc57 2008-11-20 17:10:44 +00:00
dswitkin a8d732d084 Ported over the BitVector bug fix and new unit test from Satoru.
git-svn-id: https://zxing.googlecode.com/svn/trunk@742 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-20 17:08:30 +00:00
srowen 56f194794b Added ITF-14 decoder from Kevin. Not enabled yet as we need to think a bit about how to handle this first. Also, the unit tests aren't passing for me but are for Kevin so I have commented them for the moment.
git-svn-id: https://zxing.googlecode.com/svn/trunk@741 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-20 14:07:19 +00:00
srowen 65be5295c8 Remove Debug and switch to eceptions in Encoder / Writer API
git-svn-id: https://zxing.googlecode.com/svn/trunk@740 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-20 12:26:20 +00:00
dswitkin 8a018c8af8 Changed the Writer interface to provide contents as a String instead of a byte array.
git-svn-id: https://zxing.googlecode.com/svn/trunk@738 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 20:12:38 +00:00
dswitkin e7dfffc3d0 Fixed more unit tests.
git-svn-id: https://zxing.googlecode.com/svn/trunk@737 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 19:16:16 +00:00
dswitkin a13d3ca04d Fixed testIsValidKanjiSequence(). Looks like the data arrays got copied over wrong from the C++ hex strings.
git-svn-id: https://zxing.googlecode.com/svn/trunk@736 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 18:55:28 +00:00
dswitkin bbfd2639d3 Deleted a big honking polynomial table that was unused, and a related class.
git-svn-id: https://zxing.googlecode.com/svn/trunk@735 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 18:50:51 +00:00
dswitkin fb840a56ca Did some optimization and cleanup.
git-svn-id: https://zxing.googlecode.com/svn/trunk@734 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 18:35:10 +00:00
dswitkin a9b0be8b93 Added the quiet zone to the QRCodeWriter.
git-svn-id: https://zxing.googlecode.com/svn/trunk@733 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 16:39:59 +00:00
dswitkin 549771b3de Fixed testInterleaveWithECBytes().
git-svn-id: https://zxing.googlecode.com/svn/trunk@732 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 16:04:48 +00:00
dswitkin dbe7f8aa85 Fixed two more tests.
git-svn-id: https://zxing.googlecode.com/svn/trunk@731 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 15:51:44 +00:00
srowen 0a1a550a0f Corrected logic to handle case where remainder polynomial has leading 0 coefficients.
git-svn-id: https://zxing.googlecode.com/svn/trunk@730 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 12:39:18 +00:00
ccmysen a16d3ba6ef Changes to the matrix and debug classes to make some tests pass.
I'm not super happy about making LOG_INFO a noop, but I don't know the general
solution off hand.

In any case, MatrixUtilTestCase and MaskUtilTestCase both pass now.


git-svn-id: https://zxing.googlecode.com/svn/trunk@729 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 09:26:54 +00:00
dswitkin 581464ad21 Fixed a bunch more tests, and commented out all of the Renderer tests for now so everything compiles.
Sean, try commenting out testEncode(). It'll let you run a bit further to see a genuine problem that testInterleaveWithECBytes() finds.

git-svn-id: https://zxing.googlecode.com/svn/trunk@728 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-19 01:58:31 +00:00
dswitkin bafe58d06e Moved ByteArray up to core/common now that it has no dependencies on qrcode/encoder.
git-svn-id: https://zxing.googlecode.com/svn/trunk@727 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 23:01:42 +00:00
dswitkin c95fe48a76 Made several good fixes to and because of the unit tests. Turns out the EC array was never being set to the right size. I've now established that the Reed Solomon code is generating one fewer coefficient than the layer above it asked for.
git-svn-id: https://zxing.googlecode.com/svn/trunk@726 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 22:54:04 +00:00
dswitkin b5dbec4469 Created a WriterException class and updated a bunch of documentation.
git-svn-id: https://zxing.googlecode.com/svn/trunk@725 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 21:46:24 +00:00
dswitkin 1357c87441 Made some incremental progress on the Encoder unit test. I think we've now hit the first real bug in the code.
git-svn-id: https://zxing.googlecode.com/svn/trunk@724 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 21:34:17 +00:00
srowen 4883f8cd11 Finally submit tiny change to comments here
git-svn-id: https://zxing.googlecode.com/svn/trunk@722 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 21:18:10 +00:00
srowen 604a10e8e5 Replace IllegalStateException; still want to make it WriterException
git-svn-id: https://zxing.googlecode.com/svn/trunk@721 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 21:15:30 +00:00
dswitkin 919958c40f Made a small change to allow discovery of multiple email addresses within a Docomo MECARD.
git-svn-id: https://zxing.googlecode.com/svn/trunk@720 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 19:44:25 +00:00
ccmysen 559c79e1cc Adding in the rest of the qrcode test cases.
Most of them seem to be having run errors right now, but most of the major
syntax errors are now gone. The main missing feature right now is the use of
the GaloisField polynomial and a working Renderer class.



git-svn-id: https://zxing.googlecode.com/svn/trunk@719 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 18:56:19 +00:00
ccmysen e14607e785 Add testdata for the qrcode encoder tests (mainly part of the renderer testcase).
git-svn-id: https://zxing.googlecode.com/svn/trunk@718 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 18:17:22 +00:00
dswitkin 83758391f7 My BitVector implementation was totally buggy. I rewrote a lot of it and ported the test case, which now passes.
Now I'm tracking down an assertion in Encoder.InterleaveWithECBytes().

git-svn-id: https://zxing.googlecode.com/svn/trunk@717 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-18 15:34:45 +00:00
dswitkin 8175e2cc25 Created the base Writer object for all barcode encoding, then wrote a QR Code version. A Writer encodes a series of raw bytes into a 2D greyscale bitmap, represented by a ByteArray. This seems like a better container than MonochromeBitmapSource, because we may want shades of grey when encoding future formats. The next step is to hook this up to the Android client.
git-svn-id: https://zxing.googlecode.com/svn/trunk@716 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-17 22:10:45 +00:00
dswitkin 8d79ad7085 Fixed the build.
git-svn-id: https://zxing.googlecode.com/svn/trunk@715 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-17 20:49:10 +00:00
srowen e9a29fb098 move to singleton ReaderException for a bit more performance
git-svn-id: https://zxing.googlecode.com/svn/trunk@714 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-17 17:56:31 +00:00
srowen be59e299dc Add a bit of a hack to better detect UTF-8 in the wild, versus ISO88591
git-svn-id: https://zxing.googlecode.com/svn/trunk@712 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-16 12:46:18 +00:00
srowen 4fcdac3ae7 Change assert to an exception since this facility would not be available in J2ME. I vote for removing use of Debug anyway.
git-svn-id: https://zxing.googlecode.com/svn/trunk@711 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-16 12:03:11 +00:00
srowen 247e7c95bb Now uses new Reed Solomon encoder code
git-svn-id: https://zxing.googlecode.com/svn/trunk@709 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-15 20:23:32 +00:00
srowen c5d81d76d1 Add to result the raw, but parsed, bytes of byte segments in 2D barcodes
git-svn-id: https://zxing.googlecode.com/svn/trunk@708 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-15 13:50:18 +00:00
srowen ce341d92aa Bug fix to unrandomization routine from sanfordsquires
git-svn-id: https://zxing.googlecode.com/svn/trunk@707 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-15 12:58:36 +00:00
srowen 62d9959a3c Remove my old email address from files. Might as well save spammers the trouble.
git-svn-id: https://zxing.googlecode.com/svn/trunk@706 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-15 00:07:25 +00:00
dswitkin aea12b5286 Wrote a new ByteArray class to replace StringPiece and fixed all uses of it. Also converted all uses of stl::string (which was being used as vector<unsigned char>) to ByteArray. Everything in the Encoder but the Reed Solomon related code compiles now.
ByteArray could certainly move up to the common package, although it currently has a dependency on BitVector. We'll have to figure out what to do with the latter first.

This is the first set of changes I've made which are error prone. They involved a lot of pointer conversion, signed/unsigned semantics, etc. These diffs may have clues for later bugs.

git-svn-id: https://zxing.googlecode.com/svn/trunk@705 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 21:51:26 +00:00
dswitkin fabdd40edf Huge progress on the Encoder. I'm down to StringPiece errors (that class hasn't been replaced yet) and a few nasty methods, which call into Reed Solomon (not done yet).
git-svn-id: https://zxing.googlecode.com/svn/trunk@704 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 18:43:54 +00:00
srowen f80cd1ff51 More enhancements to Reed-Solomon tests
git-svn-id: https://zxing.googlecode.com/svn/trunk@703 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 18:34:19 +00:00
dswitkin b625c6f7e5 Got MatrixUtil to compile, and refactored some methods out of it, and into Matrix where they belong.
git-svn-id: https://zxing.googlecode.com/svn/trunk@702 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 16:21:05 +00:00
dswitkin 97ffa36734 Did a bunch of comments cleanup.
git-svn-id: https://zxing.googlecode.com/svn/trunk@701 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 15:40:38 +00:00
srowen 7cae0d4cc9 Added Reed-Solomon encoder, suitable for QR Code encoding
git-svn-id: https://zxing.googlecode.com/svn/trunk@699 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 12:40:55 +00:00
dswitkin 5dba28fc86 Wrote a reasonable implementation of BitVector which now compiles.
git-svn-id: https://zxing.googlecode.com/svn/trunk@698 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 21:59:08 +00:00
dswitkin 6f4898c68f Wrote a Matrix class and fixed all uses of it, as well as other small fixes like StringBuffer. MaskUtil and QRCode now compile with no errors.
git-svn-id: https://zxing.googlecode.com/svn/trunk@697 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 21:18:56 +00:00
srowen 8666ac2f8f Comment out QR code encoder package for the moment
git-svn-id: https://zxing.googlecode.com/svn/trunk@696 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 19:08:25 +00:00
dswitkin 60f3af2607 Converted the Mode and ECLevel enums in QRCode.java.
git-svn-id: https://zxing.googlecode.com/svn/trunk@695 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 17:12:53 +00:00
dswitkin f50305895d Began porting the QR Code encoder from ChartServer to Java/ZXing. Some important comments are flagged with JAVAPORT. I've done the following so far:
- Created Java files with our headers, packages, etc.
- Converted includes to imports, or commented out the unresolved dependencies
- Merged all the .h and .cpp contents into Java classes
- Fixed most of the formatting
- Did all the simple transformations (bool, NULL, const, struct, string, ::, ->)
- Created a Debug class to handle all the asserts and logging
- Fixed about half of the static arrays
- Removed some pthread cruft

IMPORTANT:

- Please do not start hacking this code up as I'm going to keep making large changes to it. In particular, we need to leave the trailing underscores on member variables for now. Once everything is compiling with no errors, we can revisit stylistic issues.
- There will be a number of similar classes within the encoder and in the rest of ZXing. We should refactor those later (BitVector and BitArray come to mind). In the mean time, I want to get everything working and the tests passing before we do that.

git-svn-id: https://zxing.googlecode.com/svn/trunk@694 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 16:14:44 +00:00
dswitkin cd0ff37fdb Made a small change to the KDDI AU parsing code to handle pronunciation (aka Furigana) specifically.
git-svn-id: https://zxing.googlecode.com/svn/trunk@692 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-12 16:21:19 +00:00
srowen 977c2e38ca Updates from sanfordsquires to fix RS decoding for Datamatrix
git-svn-id: https://zxing.googlecode.com/svn/trunk@689 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-12 13:47:45 +00:00