Commit graph

827 commits

Author SHA1 Message Date
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 405aba0044 Latent bug I think from earlier change to List from Vector
git-svn-id: https://zxing.googlecode.com/svn/trunk@713 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-17 17:53:05 +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 ecc05c1ef3 Appear to have fixed the URL escaping issues this time without regression
git-svn-id: https://zxing.googlecode.com/svn/trunk@710 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-16 10:20:20 +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 002d80eed2 Added note about dex's issue with post-optimization debug symbol table
git-svn-id: https://zxing.googlecode.com/svn/trunk@700 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 14:13:45 +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
srowen ad307ebc0b making stuff final, weakening types, etc. per IntelliJ analysis
git-svn-id: https://zxing.googlecode.com/svn/trunk@693 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 13:14:53 +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
dswitkin bbbef0d716 Wrote a new bookmark picker activity for use by the Share button, because I couldn't get the platform version to work.
git-svn-id: https://zxing.googlecode.com/svn/trunk@691 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-12 15:42:44 +00:00
dswitkin acd409b094 Fixed a regression in the QR Code encoder. The contents do not need to be run through URLEncoder first.
git-svn-id: https://zxing.googlecode.com/svn/trunk@690 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-12 14:40:23 +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
srowen d56fb38427 Updates from sanfordsquires to fix RS decoding for Datamatrix
git-svn-id: https://zxing.googlecode.com/svn/trunk@688 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-12 12:59:47 +00:00
dswitkin bb52a165d0 Changed the ChartServer and Search Book Contents URLs back to google.com instead of using the LocaleManager, as they are API calls, not user-facing websites.
git-svn-id: https://zxing.googlecode.com/svn/trunk@687 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-11 19:19:11 +00:00
dswitkin e9a6e8e906 Added support for Furigana using the SOUND field in MECARD. AddressBookParsedResult now has a pronunciation field to represent this. I'm not aware of whether this is supported in other formats like VCARD, so they all pass null for now.
git-svn-id: https://zxing.googlecode.com/svn/trunk@686 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-11 16:31:27 +00:00
srowen 88b77d67db Now attempts to use locale-specific Google property in client. Also made some stuff final that can be.
git-svn-id: https://zxing.googlecode.com/svn/trunk@685 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-11 15:32:31 +00:00
dswitkin 5a26635782 Somehow the IntelliJ Subversion integration did not commit these deleted files when I did the rename.
git-svn-id: https://zxing.googlecode.com/svn/trunk@684 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-11 14:48:11 +00:00
dswitkin 9de8f5e1f0 Hid the Share menu if the results screen was showing, since it didn't make sense. Also change the autofocus delay to 1.5 seconds, to make it hunt a little less, and give the autoexposure system more time to run.
git-svn-id: https://zxing.googlecode.com/svn/trunk@683 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-10 22:47:09 +00:00
dswitkin aef1dedb61 Did a bunch of renaming, there was no need for the Barcodes prefix.
git-svn-id: https://zxing.googlecode.com/svn/trunk@682 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-10 20:50:34 +00:00
dswitkin f21c34ae16 First pass at adding a UI for sharing data via QR Codes. There's now a Share button in the main capture menu which leads to a choice of contacts, bookmarks, and clipboard contents, which will be encoded and shown full screen. Launching the bookmarks picker currently crashes with a permission problem, which I'm investigating.
git-svn-id: https://zxing.googlecode.com/svn/trunk@681 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-10 20:35:33 +00:00
srowen ae46d12d21 Partially addressed Reed-Solomon decoding issue for Datamatrix, but not entirely. Still some small issue that prevents correcting as many errors as possible.
git-svn-id: https://zxing.googlecode.com/svn/trunk@680 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-09 16:22:43 +00:00
srowen 04f17f67a6 Made new array fields final
git-svn-id: https://zxing.googlecode.com/svn/trunk@679 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-09 16:20:15 +00:00
srowen 5f817c69b6 Address a small but clear bug in detector logic
git-svn-id: https://zxing.googlecode.com/svn/trunk@678 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-08 14:27:08 +00:00
srowen 41a386f04c Attempt to make encoding detection slightly more accurate -- rule out Shift_JIS in a few more cases
git-svn-id: https://zxing.googlecode.com/svn/trunk@677 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-08 14:25:36 +00:00
dswitkin 99f49760da Renamed launcher icon.
git-svn-id: https://zxing.googlecode.com/svn/trunk@676 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-07 15:07:54 +00:00
dswitkin de83fdf806 Fixed two leaks when using AndroidHttpClient.
git-svn-id: https://zxing.googlecode.com/svn/trunk@675 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-06 19:55:38 +00:00
srowen 56644b1af2 Small additional error check in decoder
git-svn-id: https://zxing.googlecode.com/svn/trunk@674 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-06 19:14:48 +00:00
dswitkin 034b6ef1f2 Added support for landscape mode when encoding QR Codes, and made some small layout improvements.
git-svn-id: https://zxing.googlecode.com/svn/trunk@672 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-06 17:17:07 +00:00
dswitkin d9dce6b108 Finished renaming UPC --> Product in a few places.
git-svn-id: https://zxing.googlecode.com/svn/trunk@671 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-06 16:25:39 +00:00
dswitkin 4c5c81e8a5 Added support for supplying a postal address when encoding a QR Code.
git-svn-id: https://zxing.googlecode.com/svn/trunk@670 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-06 16:13:16 +00:00
dswitkin c4a28fa4a7 Made some temporary changes to make throwing ReaderExceptions more efficient. Long term, we need to delete this class and change the decoders to return errors instead of throwing.
git-svn-id: https://zxing.googlecode.com/svn/trunk@669 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-05 19:16:27 +00:00
srowen e6e3472471 Renamed UPC result type to Product, and introduced an idea of 'product ID' and 'normalized product ID' to account for UPC-E, where the actual visible ID is different from what we may want to search for as a key. Updated clients to use this too.
git-svn-id: https://zxing.googlecode.com/svn/trunk@668 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-04 12:08:19 +00:00
dswitkin ef7c421a66 Fixed Search Book Contents when built under ProGuard.
git-svn-id: https://zxing.googlecode.com/svn/trunk@667 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-03 16:13:56 +00:00
dswitkin 1ecf5c98fd Fixed the ZXing Test camera mode when using ProGuard.
git-svn-id: https://zxing.googlecode.com/svn/trunk@666 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-02 16:10:54 +00:00