zbar-commits Mailing List for ZBar bar code reader
Status: Beta
Brought to you by:
spadix
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(3) |
Feb
(8) |
Mar
(7) |
Apr
(1) |
May
(7) |
Jun
(6) |
Jul
(5) |
Aug
(3) |
Sep
(4) |
Oct
|
Nov
(3) |
Dec
(1) |
2009 |
Jan
(1) |
Feb
(10) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(10) |
Sep
(11) |
Oct
(27) |
Nov
(14) |
Dec
(3) |
2010 |
Jan
(4) |
Feb
(1) |
Mar
(10) |
Apr
(2) |
May
(5) |
Jun
(18) |
Jul
(15) |
Aug
(17) |
Sep
(4) |
Oct
|
Nov
(11) |
Dec
(10) |
2011 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(14) |
Jul
(3) |
Aug
(10) |
Sep
(6) |
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
From: <sp...@us...> - 2012-10-15 06:06:11
|
changeset: 362:38e78368283d user: sp...@us... date: Sun Oct 14 23:02:08 2012 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/38e78368283d description: Added tag iPhoneSDK-1.3.1 for changeset 5eb3c8786845 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 5eb3c8786845 -r 38e78368283d .hgtags --- a/.hgtags Sun Oct 14 20:54:20 2012 -0700 +++ b/.hgtags Sun Oct 14 23:02:08 2012 -0700 @@ -26,3 +26,4 @@ 9e7bad13ae6a4b65e0f0964512f96284d37f0dc8 iPhoneSDK-1.2.1 146b857ff41ae462cc52f8dddf46d867763433a1 iPhoneSDK-1.2.2 9b946a7ead73ac99e121de2e7f495213cda88e6f AndroidSDK-0.1 +5eb3c8786845fe3ad2c74f6a660e70176b88347f iPhoneSDK-1.3.1 |
From: <sp...@us...> - 2012-10-15 06:06:10
|
changeset: 361:5eb3c8786845 user: sp...@us... date: Sun Oct 14 20:54:20 2012 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/5eb3c8786845 description: iOS: fix examples - fix EmbedReader initial iPad orientation - fix TabReader shouldn't show controls diffstat: iphone/ChangeLog | 3 +++ iphone/bin/CreateDMG.sh | 2 +- iphone/examples/EmbedReader/EmbedReader/EmbedReader-Info.plist | 1 + iphone/examples/EmbedReader/EmbedReader/EmbedReaderViewController.m | 5 +++++ iphone/examples/TabReader/TabReader.xcodeproj/xcshareddata/xcschemes/TabReader.xcscheme | 10 +++++++--- iphone/examples/TabReader/TabReader/TabReaderAppDelegate.m | 6 +++--- iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.dmg.xcscheme | 10 +++++++--- iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.xcscheme | 10 +++++++--- 8 files changed, 34 insertions(+), 13 deletions(-) diffs (171 lines): diff -r 353ef20801ac -r 5eb3c8786845 iphone/ChangeLog --- a/iphone/ChangeLog Sun Oct 14 13:59:47 2012 -0700 +++ b/iphone/ChangeLog Sun Oct 14 20:54:20 2012 -0700 @@ -1,4 +1,7 @@ version 1.3.1: + * fix examples + - fix EmbedReader initial iPad orientation + - fix TabReader shouldn't show controls * add retry workaround when device lock fails - add iPhone 5 launch image to examples - doc updates diff -r 353ef20801ac -r 5eb3c8786845 iphone/bin/CreateDMG.sh --- a/iphone/bin/CreateDMG.sh Sun Oct 14 13:59:47 2012 -0700 +++ b/iphone/bin/CreateDMG.sh Sun Oct 14 20:54:20 2012 -0700 @@ -25,7 +25,7 @@ done # prepare examples for distribution -for example in $(find $TARGET_BUILD_DIR/Examples -depth 1) +for example in $(find $TARGET_BUILD_DIR/Examples -depth 1 -not -name '.*') do rm -rf $example/{build,*.xcodeproj/{*.{mode1v3,pbxuser},project.xcworkspace,xcuserdata},ZBarSDK} cp -af $BUILT_PRODUCTS_DIR/ZBarSDK $example/ diff -r 353ef20801ac -r 5eb3c8786845 iphone/examples/EmbedReader/EmbedReader/EmbedReader-Info.plist --- a/iphone/examples/EmbedReader/EmbedReader/EmbedReader-Info.plist Sun Oct 14 13:59:47 2012 -0700 +++ b/iphone/examples/EmbedReader/EmbedReader/EmbedReader-Info.plist Sun Oct 14 20:54:20 2012 -0700 @@ -33,6 +33,7 @@ <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> </array> </dict> </plist> diff -r 353ef20801ac -r 5eb3c8786845 iphone/examples/EmbedReader/EmbedReader/EmbedReaderViewController.m --- a/iphone/examples/EmbedReader/EmbedReader/EmbedReaderViewController.m Sun Oct 14 13:59:47 2012 -0700 +++ b/iphone/examples/EmbedReader/EmbedReader/EmbedReaderViewController.m Sun Oct 14 20:54:20 2012 -0700 @@ -35,6 +35,11 @@ // the delegate receives decode results readerView.readerDelegate = self; + // ensure initial camera orientation is correctly set + UIApplication *app = [UIApplication sharedApplication]; + [readerView willRotateToInterfaceOrientation: app.statusBarOrientation + duration: 0]; + // you can use this to support the simulator if(TARGET_IPHONE_SIMULATOR) { cameraSim = [[ZBarCameraSimulator alloc] diff -r 353ef20801ac -r 5eb3c8786845 iphone/examples/TabReader/TabReader.xcodeproj/xcshareddata/xcschemes/TabReader.xcscheme --- a/iphone/examples/TabReader/TabReader.xcodeproj/xcshareddata/xcschemes/TabReader.xcscheme Sun Oct 14 13:59:47 2012 -0700 +++ b/iphone/examples/TabReader/TabReader.xcodeproj/xcshareddata/xcschemes/TabReader.xcscheme Sun Oct 14 20:54:20 2012 -0700 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - version = "1.3"> + version = "1.8"> <BuildAction parallelizeBuildables = "YES" buildImplicitDependencies = "YES"> @@ -36,7 +36,10 @@ displayScale = "1.00" launchStyle = "0" useCustomWorkingDirectory = "NO" - buildConfiguration = "Debug"> + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> <BuildableProductRunnable> <BuildableReference BuildableIdentifier = "primary" @@ -55,7 +58,8 @@ shouldUseLaunchSchemeArgsEnv = "YES" savedToolIdentifier = "" useCustomWorkingDirectory = "NO" - buildConfiguration = "Release"> + buildConfiguration = "Release" + debugDocumentVersioning = "YES"> <BuildableProductRunnable> <BuildableReference BuildableIdentifier = "primary" diff -r 353ef20801ac -r 5eb3c8786845 iphone/examples/TabReader/TabReader/TabReaderAppDelegate.m --- a/iphone/examples/TabReader/TabReader/TabReaderAppDelegate.m Sun Oct 14 13:59:47 2012 -0700 +++ b/iphone/examples/TabReader/TabReader/TabReaderAppDelegate.m Sun Oct 14 20:54:20 2012 -0700 @@ -16,9 +16,6 @@ - (BOOL) application: (UIApplication*) application didFinishLaunchingWithOptions: (NSDictionary*) options { - self.window.rootViewController = self.tabBarController; - [self.window makeKeyAndVisible]; - // force class to load so it may be referenced directly from nib [ZBarReaderViewController class]; @@ -28,6 +25,9 @@ reader.showsZBarControls = NO; reader.supportedOrientationsMask = ZBarOrientationMaskAll; + self.window.rootViewController = self.tabBarController; + [self.window makeKeyAndVisible]; + return(YES); } diff -r 353ef20801ac -r 5eb3c8786845 iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.dmg.xcscheme --- a/iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.dmg.xcscheme Sun Oct 14 13:59:47 2012 -0700 +++ b/iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.dmg.xcscheme Sun Oct 14 20:54:20 2012 -0700 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - version = "1.3"> + version = "1.8"> <BuildAction parallelizeBuildables = "YES" buildImplicitDependencies = "YES"> @@ -36,7 +36,10 @@ displayScale = "1.00" launchStyle = "0" useCustomWorkingDirectory = "NO" - buildConfiguration = "Release"> + buildConfiguration = "Release" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> <AdditionalOptions> </AdditionalOptions> </LaunchAction> @@ -46,7 +49,8 @@ shouldUseLaunchSchemeArgsEnv = "YES" savedToolIdentifier = "" useCustomWorkingDirectory = "NO" - buildConfiguration = "Release"> + buildConfiguration = "Release" + debugDocumentVersioning = "YES"> </ProfileAction> <AnalyzeAction buildConfiguration = "Release"> diff -r 353ef20801ac -r 5eb3c8786845 iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.xcscheme --- a/iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.xcscheme Sun Oct 14 13:59:47 2012 -0700 +++ b/iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.xcscheme Sun Oct 14 20:54:20 2012 -0700 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - version = "1.3"> + version = "1.8"> <BuildAction parallelizeBuildables = "YES" buildImplicitDependencies = "YES"> @@ -36,7 +36,10 @@ displayScale = "1.00" launchStyle = "0" useCustomWorkingDirectory = "NO" - buildConfiguration = "Debug"> + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> <AdditionalOptions> </AdditionalOptions> </LaunchAction> @@ -46,7 +49,8 @@ shouldUseLaunchSchemeArgsEnv = "YES" savedToolIdentifier = "" useCustomWorkingDirectory = "NO" - buildConfiguration = "Release"> + buildConfiguration = "Release" + debugDocumentVersioning = "YES"> </ProfileAction> <AnalyzeAction buildConfiguration = "Release"> |
From: <sp...@us...> - 2012-10-15 06:06:10
|
changeset: 360:353ef20801ac user: sp...@us... date: Sun Oct 14 13:59:47 2012 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/353ef20801ac description: iOS: add retry workaround when device lock fails - add iPhone 5 launch image to examples - doc updates diffstat: iphone/ChangeLog | 9 +- iphone/README | 6 +- iphone/ZBarReaderViewImpl_Capture.m | 52 +++++++-- iphone/bin/CreateDMG.sh | 6 + iphone/doc/camera.rst | 23 ++-- iphone/doc/compat.rst | 7 + iphone/doc/conf.py | 2 +- iphone/doc/custom.rst | 16 +- iphone/doc/faq.rst | 42 ++----- iphone/doc/index.rst | 8 +- iphone/doc/install.rst | 13 +- iphone/doc/optimizing.rst | 28 ++-- iphone/doc/picker.rst | 6 +- iphone/doc/tutorial.rst | 4 +- iphone/examples/EmbedReader/Def...@2x...g | 0 iphone/examples/EmbedReader/EmbedReader.xcodeproj/project.pbxproj | 5 + iphone/examples/ReaderSample/Def...@2x...g | 0 iphone/examples/ReaderSample/ReaderSample.xcodeproj/project.pbxproj | 4 + iphone/examples/ReaderSample/ReaderSample/ReaderSampleAppDelegate.m | 7 - iphone/examples/ReaderSample/ReaderSample/ReaderSampleViewController.m | 2 +- iphone/examples/TabReader/Def...@2x...g | 0 iphone/examples/TabReader/TabReader.xcodeproj/project.pbxproj | 4 + iphone/examples/TabReader/ZBarSDK | 2 +- iphone/examples/readertest/Def...@2x...g | 0 iphone/examples/readertest/readertest.xcodeproj/project.pbxproj | 4 + iphone/include/ZBarSDK/ZBarReaderView.h | 2 +- iphone/res/Columns.DS_Store | 0 iphone/res/ZBarSDK-Info.plist | 2 +- iphone/zbar.xcodeproj/project.pbxproj | 7 +- 29 files changed, 152 insertions(+), 109 deletions(-) diffs (truncated from 779 to 300 lines): diff -r d6b16528967b -r 353ef20801ac iphone/ChangeLog --- a/iphone/ChangeLog Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/ChangeLog Sun Oct 14 13:59:47 2012 -0700 @@ -1,4 +1,11 @@ -current: +version 1.3.1: + * add retry workaround when device lock fails + - add iPhone 5 launch image to examples + - doc updates + * Lion and Xcode updates + - fix new warnings/errors + - find missing buddy + - fix SDK bg image: force resoution to 72dpi * Fix EmbedReader example rotation interaction version 1.2.2: diff -r d6b16528967b -r 353ef20801ac iphone/README --- a/iphone/README Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/README Sun Oct 14 13:59:47 2012 -0700 @@ -1,12 +1,12 @@ -ZBar iPhone SDK -=============== +ZBar iOS SDK +============ ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, DataBar, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. These are the Objective C wrappers and integrated widget for developing -with the library on the iPhone platform. +with the library on the iOS platform. Check the ZBar project home page for the latest release, forums, etc. diff -r d6b16528967b -r 353ef20801ac iphone/ZBarReaderViewImpl_Capture.m --- a/iphone/ZBarReaderViewImpl_Capture.m Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/ZBarReaderViewImpl_Capture.m Sun Oct 14 13:59:47 2012 -0700 @@ -247,6 +247,36 @@ [captureReader flushCache]; } +- (void) configureDevice +{ + if([device isFocusModeSupported: AVCaptureFocusModeContinuousAutoFocus]) + device.focusMode = AVCaptureFocusModeContinuousAutoFocus; + if([device isTorchModeSupported: torchMode]) + device.torchMode = torchMode; +} + +- (void) lockDevice +{ + if(!running || locked) { + assert(0); + return; + } + + // lock device and set focus mode + NSError *error = nil; + if([device lockForConfiguration: &error]) { + locked = YES; + [self configureDevice]; + } + else { + zlog(@"failed to lock device: %@", error); + // just keep trying + [self performSelector: @selector(lockDevice) + withObject: nil + afterDelay: .5]; + } +} + // AVCaptureSession notifications @@ -256,17 +286,9 @@ if(running) return; running = YES; + locked = NO; - // lock device and set focus mode - NSError *error = nil; - if([device lockForConfiguration: &error]) { - if([device isFocusModeSupported: AVCaptureFocusModeContinuousAutoFocus]) - device.focusMode = AVCaptureFocusModeContinuousAutoFocus; - if([device isTorchModeSupported: torchMode]) - device.torchMode = torchMode; - } - else - zlog(@"failed to lock device: %@", error); + [self lockDevice]; if([readerDelegate respondsToSelector: @selector(readerViewDidStart:)]) [readerDelegate readerViewDidStart: self]; @@ -277,9 +299,15 @@ zlog(@"onVideoStop: %@", note); if(!running) return; + running = NO; - [device unlockForConfiguration]; - running = NO; + if(locked) + [device unlockForConfiguration]; + else + [NSObject cancelPreviousPerformRequestsWithTarget: self + selector: @selector(lockDevice) + object: nil]; + locked = NO; if([readerDelegate respondsToSelector: @selector(readerView:didStopWithError:)]) diff -r d6b16528967b -r 353ef20801ac iphone/bin/CreateDMG.sh --- a/iphone/bin/CreateDMG.sh Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/bin/CreateDMG.sh Sun Oct 14 13:59:47 2012 -0700 @@ -31,6 +31,12 @@ cp -af $BUILT_PRODUCTS_DIR/ZBarSDK $example/ done +# override subdir .DS_Stores +for dir in $(find $TARGET_BUILD_DIR -type d -depth 1) +do + cp -af $RES/Columns.DS_Store $dir/.DS_Store +done + hdiutil create -ov -fs HFS+ -format UDZO -imagekey zlib-level=9 \ -volname $VOLNAME \ -srcdir $TARGET_BUILD_DIR \ diff -r d6b16528967b -r 353ef20801ac iphone/doc/camera.rst --- a/iphone/doc/camera.rst Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/doc/camera.rst Sun Oct 14 13:59:47 2012 -0700 @@ -1,8 +1,8 @@ Scanning From the Camera Feed ============================= -Many iPhone developers want their application to support automatic recognition -of barcodes from the camera feed in real-time. ZBar makes this easy! +Many iOS developers want their application to support automatic recognition of +barcodes from the camera feed in real-time. ZBar makes this easy! There are three levels that you may choose to integrate at, from least complex (recommended) to most complex these are: @@ -20,8 +20,7 @@ -------------------------------- This is the fastest, easiest and recommend way to get the barcode reader into -your application. It is also the only way to support :doc:`automatic fallback -for iOS 3.1 <compat>`. The procedure is the same as using a +your application. The procedure is the same as using a UIImagePickerController to take a picture with the camera, so it will help if you are familiar with that. Basically you: @@ -29,7 +28,7 @@ This is as simple as creating a new :class:`ZBarReaderViewController`:: - ZBarReaderViewController *reader = [ZBarReaderViewController new]; + ZBarReaderViewController *reader = [[ZBarReaderViewController alloc] init]; 2. Setup a delegate to receive the results. @@ -45,6 +44,7 @@ further customize the view via the :member:`~ZBarReaderViewController::readerView` property:: + // disable QR Code [reader.scanner setSymbology: ZBAR_QRCODE config: ZBAR_CFG_ENABLE to: 0]; @@ -54,13 +54,13 @@ 4. Present the reader to the user. - Typically the controller is presented modally, although the new controller - does not require it (note that modal presentation is the only option if you - want to support :doc:`iOS 3.1 fallback <compat>`):: + Typically the controller is presented modally:: [self presentModalViewController: reader animated: YES]; + Alternatively, it may be added to a container controller. + 5. Process the results. The controller will call the @@ -112,10 +112,9 @@ :class:`ZBarReaderViewController` is a relatively thin wrapper around a :class:`ZBarReaderView`; it is possible to use the view directly, even from -Interface Builder. You will lose the automatic fallback for iOS 3.1 and some -of the simulator and rotation hooks. The documentation is also less complete, -so you need to be able to UTSL. See the :file:`EmbedReader` sample for a -working example. +Interface Builder. You lose only some of the simulator and rotation hooks. +The documentation is also less complete, so you need to be able to UTSL. See +the :file:`EmbedReader` sample for a working example. Using the ZBarCaptureReader diff -r d6b16528967b -r 353ef20801ac iphone/doc/compat.rst --- a/iphone/doc/compat.rst Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/doc/compat.rst Sun Oct 14 13:59:47 2012 -0700 @@ -9,6 +9,13 @@ vendor. +.. warning:: + + Versions before iOS 4 are no longer supported by the library. We are no + longer able to test anything in this section, so you're on your own if you + try to make use of it. + + The Private API --------------- diff -r d6b16528967b -r 353ef20801ac iphone/doc/conf.py --- a/iphone/doc/conf.py Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/doc/conf.py Sun Oct 14 13:59:47 2012 -0700 @@ -10,7 +10,7 @@ exclude_patterns = ['.#*'] project = u'ZBar iPhone SDK' -copyright = u'2010, Jeff Brown et al' +copyright = u'2010-2012, Jeff Brown et al' today_fmt = '%Y-%m-%d' info = readPlist('../res/ZBarSDK-Info.plist') diff -r d6b16528967b -r 353ef20801ac iphone/doc/custom.rst --- a/iphone/doc/custom.rst Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/doc/custom.rst Sun Oct 14 13:59:47 2012 -0700 @@ -18,16 +18,16 @@ customization - you are limited to the system picker interface provided by the :class:`UIImagePickerController`. -If you are using a :class:`ZBarReaderViewController`, are *only* planning to -support iOS 4 and just want to add to the existing controls, you can simply -set your overlay to include the additional view hierarchy:: +If you are using a :class:`ZBarReaderViewController` and just want to add to +the existing controls, you can simply set your overlay to include the +additional view hierarchy:: reader.cameraOverlayView = myLogoImageView; -Otherwise, if you are using a :class:`ZBarReaderController`, still need the -iOS 3.1 fallback or prefer to completely replace the default controls, you -should disable those first. Note that you will need to provide your own -controls, which should at least include a way to dismiss the reader:: +Otherwise, if you are using a :class:`ZBarReaderController` or prefer to +completely replace the default controls, you should disable those first. Note +that you will need to provide your own controls, which should at least include +a way to dismiss the reader:: reader.showsCameraControls = NO; // for UIImagePickerController reader.showsZBarControls = NO; @@ -36,8 +36,6 @@ For manual capture with :class:`ZBarReaderController`, you should also include a control connected to :member:`~ZBarReaderController::takePicture`. -See :doc:`compat` for more information about iOS 3.1 fallbacks. - In either case, the overlay view may be loaded from a NIB, or simply created programmatically. diff -r d6b16528967b -r 353ef20801ac iphone/doc/faq.rst --- a/iphone/doc/faq.rst Fri Oct 12 21:30:58 2012 -0700 +++ b/iphone/doc/faq.rst Sun Oct 14 13:59:47 2012 -0700 @@ -21,7 +21,10 @@ ------------- Which iPhone devices does this library support? - The library works *only* with the iPhone 3GS and iPhone 4. + The library works *only* with iOS devices that have an auto-focus camera. + Currently, the iPhone 3GS, iPhone 4 and newer devices. The iPad 2 and iPad + 3 will also work in many cases, *iff* the barcode is printed large enough + to achieve good focus. Will you make it work with the iPhone 3G? *No* - the 3G it is not supported and is unlikely to ever be supported. @@ -31,38 +34,23 @@ is at least one application that found a use for this... What target iOS versions does this library work with? - iOS 4 is fully supported, including the latest video streaming interfaces. - Since Apple has dropped support for earlier versions of iOS on the App - Store, we recommend that you target only iOS 4 for reading barcodes. + iOS 4, 5 and 6 are fully supported, including the latest video streaming + interfaces. Since Apple has dropped support for earlier versions of iOS on + the App Store, we recommend that you target only iOS 4 and later for reading + barcodes. - iOS 3.1 is also supported, but you will have to resort to manual capture if - you intend to distribute on the App Store. + Note that iOS 3.1 is no longer supported; if you really think you need + that, you should still be able to get it working... See :doc:`compat` for + details about iOS version fallbacks. - The library should work all the way back to iOS 3.0, although we no longer |
From: <sp...@us...> - 2012-10-15 06:06:10
|
changeset: 359:d6b16528967b user: sp...@us... date: Fri Oct 12 21:30:58 2012 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/d6b16528967b description: iOS: Lion and Xcode updates - fix new warnings/errors - find missing buddy - fix SDK bg image: force resoution to 72dpi diffstat: iphone/ZBarReaderView.m | 2 +- iphone/ZBarReaderViewController.m | 9 +++++++-- iphone/bin/CreateDMG.sh | 7 +++++-- iphone/doc/ZBarImage.rst | 12 ++++++------ iphone/doc/camera.rst | 2 +- iphone/doc/picker.rst | 2 +- iphone/res/ZBarSDK-bg.png | 0 zbar/img_scanner.c | 8 ++++---- 8 files changed, 25 insertions(+), 17 deletions(-) diffs (160 lines): diff -r fa84e0427c24 -r d6b16528967b iphone/ZBarReaderView.m --- a/iphone/ZBarReaderView.m Sat Apr 21 15:35:43 2012 -0700 +++ b/iphone/ZBarReaderView.m Fri Oct 12 21:30:58 2012 -0700 @@ -41,7 +41,7 @@ if(self == [ZBarReaderView class]) { // this is an abstract wrapper for implementation selected // at compile time. replace with concrete subclass. - return([ZBarReaderViewImpl alloc]); + return((id)[ZBarReaderViewImpl alloc]); } return([super alloc]); } diff -r fa84e0427c24 -r d6b16528967b iphone/ZBarReaderViewController.m --- a/iphone/ZBarReaderViewController.m Sat Apr 21 15:35:43 2012 -0700 +++ b/iphone/ZBarReaderViewController.m Fri Oct 12 21:30:58 2012 -0700 @@ -82,7 +82,8 @@ return(AVCaptureTorchModeAuto); case UIImagePickerControllerCameraFlashModeOn: return(AVCaptureTorchModeOn); - //case UIImagePickerControllerCameraFlashModeOff: + case UIImagePickerControllerCameraFlashModeOff: + break; } return(AVCaptureTorchModeOff); } @@ -101,6 +102,10 @@ return(AVCaptureSessionPresetMedium); case UIImagePickerControllerQualityTypeLow: return(AVCaptureSessionPresetLow); + case UIImagePickerControllerQualityTypeIFrame1280x720: + return(AVCaptureSessionPresetiFrame1280x720); + case UIImagePickerControllerQualityTypeIFrame960x540: + return(AVCaptureSessionPresetiFrame960x540); } #endif return(nil); @@ -184,7 +189,7 @@ // fallback to old interface zlog(@"Falling back to ZBarReaderController"); [self release]; - return([ZBarReaderController new]); + return((id)[ZBarReaderController new]); } self = [super init]; diff -r fa84e0427c24 -r d6b16528967b iphone/bin/CreateDMG.sh --- a/iphone/bin/CreateDMG.sh Sat Apr 21 15:35:43 2012 -0700 +++ b/iphone/bin/CreateDMG.sh Fri Oct 12 21:30:58 2012 -0700 @@ -3,8 +3,11 @@ VOLNAME=${1:?} shift RES=$SOURCE_ROOT/res -BUDDY=$(xcrun -find PlistBuddy) \ - || exit 1 +BUDDY=/usr/libexec/PlistBuddy +if [ ! -x "$BUDDY" ]; then + BUDDY=$(xcrun -find PlistBuddy) \ + || exit 1 +fi VERSION=$($BUDDY -c 'Print :CFBundleVersion' $RES/$VOLNAME-Info.plist) \ || exit 1 DMG=$VOLNAME-$VERSION diff -r fa84e0427c24 -r d6b16528967b iphone/doc/ZBarImage.rst --- a/iphone/doc/ZBarImage.rst Sat Apr 21 15:35:43 2012 -0700 +++ b/iphone/doc/ZBarImage.rst Fri Oct 12 21:30:58 2012 -0700 @@ -23,7 +23,7 @@ .. member:: unsigned long format The image format four-charcter code (fourcc) as a 4-byte integer. Use - :ref:`fourcc:` to create a fourcc value from a string. + :ref:`fourcc:<fourcc:>` to create a fourcc value from a string. .. member:: unsigned sequence @@ -47,12 +47,12 @@ .. member:: const void *data Obtain a pointer to the raw image data. This property is read-only, use - :ref:`setData:withLength:` to set the image data. + :ref:`setData:withLength:<setData:withLength:>` to set the image data. .. member:: unsigned long dataLength Byte length of the raw image data. This property is read-only, use - :ref:`setData:withLength:` to set the image data. + :ref:`setData:withLength:<setData:withLength:>` to set the image data. .. member:: ZBarSymbolSet *symbols @@ -67,7 +67,7 @@ Convert the image to a UIImage. Only certain image formats are supported for conversion (read-only) - :See also: :ref:`UIImageWithOrientation:` + :See also: :ref:`UIImageWithOrientation:<UIImageWithOrientation:>` Class Methods @@ -102,7 +102,7 @@ :image: A `CGImage` to source the data and metadata. :Returns: The initialized :class:`ZBarImage`. - :See also: :ref:`initWithCGImage:size:` + :See also: :ref:`initWithCGImage:size:<initWithCGImage:size:>` .. _`initWithCGImage:size:`: .. describe:: - (id) initWithCGImage:(CGImageRef)image size:(CGSize)size @@ -114,7 +114,7 @@ :image: A `CGImage` to source the data and metadata. :size: The pixel size of the resulting ZBarImage. :Returns: The initialized :class:`ZBarImage`. - :See also: :ref:`initWithCGImage:crop:size:` + :See also: :ref:`initWithCGImage:crop:size:<initWithCGImage:crop:size:>` .. _`initWithCGImage:crop:size:`: .. describe:: - (id) initWithCGImage:(CGImageRef)image crop:(CGRect)crop size:(CGSize)size diff -r fa84e0427c24 -r d6b16528967b iphone/doc/camera.rst --- a/iphone/doc/camera.rst Sat Apr 21 15:35:43 2012 -0700 +++ b/iphone/doc/camera.rst Fri Oct 12 21:30:58 2012 -0700 @@ -64,7 +64,7 @@ 5. Process the results. The controller will call the - :member:`imagePickerController:didFinishPickingMediaWithInfo:` method of + ``imagePickerController:didFinishPickingMediaWithInfo:`` method of your delegate every time new results become available. The barcode data can be obtained using the :c:data:`ZBarReaderControllerResults` key of the info dictionary. This key will return "something enumerable"; keep in mind diff -r fa84e0427c24 -r d6b16528967b iphone/doc/picker.rst --- a/iphone/doc/picker.rst Sat Apr 21 15:35:43 2012 -0700 +++ b/iphone/doc/picker.rst Fri Oct 12 21:30:58 2012 -0700 @@ -46,7 +46,7 @@ 5. Process the results. The controller will call the - :member:`imagePickerController:didFinishPickingMediaWithInfo:` method of + ``imagePickerController:didFinishPickingMediaWithInfo:`` method of your delegate for a successful decode (NB *not* every time the user takes a picture or selects an image). The barcode data can be obtained using the :c:data:`ZBarReaderControllerResults` key of the info dictionary. This key diff -r fa84e0427c24 -r d6b16528967b iphone/res/ZBarSDK-bg.png Binary file iphone/res/ZBarSDK-bg.png has changed diff -r fa84e0427c24 -r d6b16528967b zbar/img_scanner.c --- a/zbar/img_scanner.c Sat Apr 21 15:35:43 2012 -0700 +++ b/zbar/img_scanner.c Fri Oct 12 21:30:58 2012 -0700 @@ -816,10 +816,10 @@ for(symp = &syms->head; *symp; ) { zbar_symbol_t *sym = *symp; if(sym->cache_count <= 0 && - (sym->type < ZBAR_COMPOSITE && sym->type > ZBAR_PARTIAL) || - sym->type == ZBAR_DATABAR || - sym->type == ZBAR_DATABAR_EXP || - sym->type == ZBAR_CODABAR) + ((sym->type < ZBAR_COMPOSITE && sym->type > ZBAR_PARTIAL) || + sym->type == ZBAR_DATABAR || + sym->type == ZBAR_DATABAR_EXP || + sym->type == ZBAR_CODABAR)) { if((sym->type == ZBAR_CODABAR || filter) && sym->quality < 4) { if(iscn->enable_cache) { |
From: <sp...@us...> - 2012-02-22 18:31:44
|
changeset: 352:bb57dcdab006 user: sp...@us... date: Wed Apr 20 18:36:36 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/bb57dcdab006 description: fix image scanner min quality filtering diffstat: ChangeLog | 1 + zbar/img_scanner.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletions(-) diffs (36 lines): diff -r 12f07c808986 -r bb57dcdab006 ChangeLog --- a/ChangeLog Sun Apr 17 20:02:05 2011 -0700 +++ b/ChangeLog Wed Apr 20 18:36:36 2011 -0700 @@ -1,4 +1,5 @@ current: + * fix image scanner min quality filtering * Codabar reliability enhancements - fix missing check - require minimum quality diff -r 12f07c808986 -r bb57dcdab006 zbar/img_scanner.c --- a/zbar/img_scanner.c Sun Apr 17 20:02:05 2011 -0700 +++ b/zbar/img_scanner.c Wed Apr 20 18:36:36 2011 -0700 @@ -815,12 +815,22 @@ zbar_symbol_t **symp; for(symp = &syms->head; *symp; ) { zbar_symbol_t *sym = *symp; - if((sym->type < ZBAR_COMPOSITE && sym->type > ZBAR_PARTIAL) || + if(sym->cache_count <= 0 && + (sym->type < ZBAR_COMPOSITE && sym->type > ZBAR_PARTIAL) || sym->type == ZBAR_DATABAR || sym->type == ZBAR_DATABAR_EXP || sym->type == ZBAR_CODABAR) { if((sym->type == ZBAR_CODABAR || filter) && sym->quality < 4) { + if(iscn->enable_cache) { + /* revert cache update */ + zbar_symbol_t *entry = cache_lookup(iscn, sym); + if(entry) + entry->cache_count--; + else + assert(0); + } + /* recycle */ *symp = sym->next; syms->nsyms--; |
From: <sp...@us...> - 2012-02-22 18:31:44
|
changeset: 350:e70d560835cd user: sp...@us... date: Thu Apr 14 17:16:48 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/e70d560835cd description: merge iPhone SDK updates diffstat: .hgignore | 2 + iphone/ChangeLog | 2 + iphone/doc/tutorial.rst | 9 +- iphone/examples/ReaderSample/Classes/ReaderSampleAppDelegate.h | 21 - iphone/examples/ReaderSample/Classes/ReaderSampleAppDelegate.m | 86 - iphone/examples/ReaderSample/Classes/ReaderSampleViewController.h | 21 - iphone/examples/ReaderSample/Classes/ReaderSampleViewController.m | 68 - iphone/examples/ReaderSample/MainWindow.xib | 444 -------- iphone/examples/ReaderSample/ReaderSample-Info.plist | 30 - iphone/examples/ReaderSample/ReaderSample.xcodeproj/project.pbxproj | 507 +++++---- iphone/examples/ReaderSample/ReaderSample/ReaderSample-Info.plist | 38 + iphone/examples/ReaderSample/ReaderSample/ReaderSample-Prefix.pch | 16 + iphone/examples/ReaderSample/ReaderSample/ReaderSampleAppDelegate.h | 20 + iphone/examples/ReaderSample/ReaderSample/ReaderSampleAppDelegate.m | 74 + iphone/examples/ReaderSample/ReaderSample/ReaderSampleViewController.h | 21 + iphone/examples/ReaderSample/ReaderSample/ReaderSampleViewController.m | 62 + iphone/examples/ReaderSample/ReaderSample/en.lproj/InfoPlist.strings | 2 + iphone/examples/ReaderSample/ReaderSample/en.lproj/MainWindow.xib | 444 ++++++++ iphone/examples/ReaderSample/ReaderSample/en.lproj/ReaderSampleViewController.xib | 320 ++++++ iphone/examples/ReaderSample/ReaderSample/main.m | 16 + iphone/examples/ReaderSample/ReaderSampleViewController.xib | 521 ---------- iphone/examples/ReaderSample/ReaderSample_Prefix.pch | 11 - iphone/examples/ReaderSample/main.m | 15 - iphone/examples/readertest/readertest.m | 146 +- iphone/examples/readertest/readertest.xcodeproj/project.pbxproj | 2 + iphone/examples/readertest/readertest.xcodeproj/xcshareddata/xcschemes/readertest.xcscheme | 76 + iphone/res/ZBarSDK-Info.plist | 2 +- iphone/zbar.xcodeproj/project.pbxproj | 123 +- iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.dmg.xcscheme | 58 + iphone/zbar.xcodeproj/xcshareddata/xcschemes/ZBarSDK.xcscheme | 58 + iphone/zbar.xcodeproj/xcshareddata/xcschemes/libzbar.xcscheme | 58 + iphone/zbar.xcodeproj/xcshareddata/xcschemes/readertest.xcscheme | 83 + 32 files changed, 1821 insertions(+), 1535 deletions(-) diffs (truncated from 3908 to 300 lines): diff -r f447fca7f811 -r e70d560835cd .hgignore --- a/.hgignore Wed Apr 13 14:42:08 2011 -0700 +++ b/.hgignore Thu Apr 14 17:16:48 2011 -0700 @@ -23,4 +23,6 @@ build *.xcodeproj/*.mode1v3 *.xcodeproj/*.pbxuser +xcuserdata +contents.xcworkspacedata .DS_Store diff -r f447fca7f811 -r e70d560835cd iphone/ChangeLog --- a/iphone/ChangeLog Wed Apr 13 14:42:08 2011 -0700 +++ b/iphone/ChangeLog Thu Apr 14 17:16:48 2011 -0700 @@ -1,4 +1,6 @@ current: + * enhance readertest to support default/demo pre-config and distribution + * updates for Xcode 4 * expose tracking box color version 1.1: diff -r f447fca7f811 -r e70d560835cd iphone/doc/tutorial.rst --- a/iphone/doc/tutorial.rst Wed Apr 13 14:42:08 2011 -0700 +++ b/iphone/doc/tutorial.rst Thu Apr 14 17:16:48 2011 -0700 @@ -97,9 +97,8 @@ 3. Drag the :file:`ZBarSDK` folder into your Xcode project. Make sure that the "Copy Items into destination group's folder" checkbox is checked. -4. Right-click the ``Frameworks`` group in your project. Select - ``Add -> Existing Frameworks...`` Make sure "All" are listed and add each - of these from the ``Device`` list (NB hold down command for multiple +4. Open the target build settings and find ``Link Binary With Libraries``. + Click the ``+`` and add each of these (NB hold down command for multiple selection): * AVFoundation.framework @@ -109,7 +108,7 @@ * libiconv.dylib 5. Import the SDK header. You will usually want to prefix it, so add it to - :file:`ReaderSample_prefix.pch`:: + :file:`ReaderSample-prefix.pch`:: // ADD: import barcode reader APIs #import "ZBarSDK.h" @@ -179,7 +178,7 @@ 1. Save everything (don't forget to save MyAppViewController.xib). -2. Select "Build and Run". +2. Build and Run the project. 3. Tap the Scan button. diff -r f447fca7f811 -r e70d560835cd iphone/examples/ReaderSample/Classes/ReaderSampleAppDelegate.h --- a/iphone/examples/ReaderSample/Classes/ReaderSampleAppDelegate.h Wed Apr 13 14:42:08 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -// -// ReaderSampleAppDelegate.h -// ReaderSample -// -// Created by spadix on 8/4/10. -// - -#import <UIKit/UIKit.h> - -@class ReaderSampleViewController; - -@interface ReaderSampleAppDelegate : NSObject <UIApplicationDelegate> { - UIWindow *window; - ReaderSampleViewController *viewController; -} - -@property (nonatomic, retain) IBOutlet UIWindow *window; -@property (nonatomic, retain) IBOutlet ReaderSampleViewController *viewController; - -@end - diff -r f447fca7f811 -r e70d560835cd iphone/examples/ReaderSample/Classes/ReaderSampleAppDelegate.m --- a/iphone/examples/ReaderSample/Classes/ReaderSampleAppDelegate.m Wed Apr 13 14:42:08 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -// -// ReaderSampleAppDelegate.m -// ReaderSample -// -// Created by spadix on 8/4/10. -// - -#import "ReaderSampleAppDelegate.h" -#import "ReaderSampleViewController.h" - -@implementation ReaderSampleAppDelegate - -@synthesize window; -@synthesize viewController; - - -#pragma mark - -#pragma mark Application lifecycle - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. - - // Add the view controller's view to the window and display. - [window addSubview:viewController.view]; - [window makeKeyAndVisible]; - - return YES; -} - - -- (void)applicationWillResignActive:(UIApplication *)application { - /* - Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - */ -} - - -- (void)applicationDidEnterBackground:(UIApplication *)application { - /* - Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - If your application supports background execution, called instead of applicationWillTerminate: when the user quits. - */ -} - - -- (void)applicationWillEnterForeground:(UIApplication *)application { - /* - Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. - */ -} - - -- (void)applicationDidBecomeActive:(UIApplication *)application { - /* - Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - */ -} - - -- (void)applicationWillTerminate:(UIApplication *)application { - /* - Called when the application is about to terminate. - See also applicationDidEnterBackground:. - */ -} - - -#pragma mark - -#pragma mark Memory management - -- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { - /* - Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. - */ -} - - -- (void)dealloc { - [viewController release]; - [window release]; - [super dealloc]; -} - - -@end diff -r f447fca7f811 -r e70d560835cd iphone/examples/ReaderSample/Classes/ReaderSampleViewController.h --- a/iphone/examples/ReaderSample/Classes/ReaderSampleViewController.h Wed Apr 13 14:42:08 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -// -// ReaderSampleViewController.h -// ReaderSample -// -// Created by spadix on 8/4/10. -// - -#import <UIKit/UIKit.h> - -@interface ReaderSampleViewController - : UIViewController - // ADD: delegate protocol - < ZBarReaderDelegate > -{ - UIImageView *resultImage; - UITextView *resultText; -} -@property (nonatomic, retain) IBOutlet UIImageView *resultImage; -@property (nonatomic, retain) IBOutlet UITextView *resultText; -- (IBAction) scanButtonTapped; -@end diff -r f447fca7f811 -r e70d560835cd iphone/examples/ReaderSample/Classes/ReaderSampleViewController.m --- a/iphone/examples/ReaderSample/Classes/ReaderSampleViewController.m Wed Apr 13 14:42:08 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -// -// ReaderSampleViewController.m -// ReaderSample -// -// Created by spadix on 8/4/10. -// - -#import "ReaderSampleViewController.h" - -@implementation ReaderSampleViewController - -@synthesize resultImage, resultText; - -- (IBAction) scanButtonTapped -{ - // ADD: present a barcode reader that scans from the camera feed - ZBarReaderViewController *reader = [ZBarReaderViewController new]; - reader.readerDelegate = self; - - ZBarImageScanner *scanner = reader.scanner; - // TODO: (optional) additional reader configuration here - - // EXAMPLE: disable rarely used I2/5 to improve performance - [scanner setSymbology: ZBAR_I25 - config: ZBAR_CFG_ENABLE - to: 0]; - - // present and release the controller - [self presentModalViewController: reader - animated: YES]; - [reader release]; -} - -- (void) imagePickerController: (UIImagePickerController*) reader - didFinishPickingMediaWithInfo: (NSDictionary*) info -{ - // ADD: get the decode results - id<NSFastEnumeration> results = - [info objectForKey: ZBarReaderControllerResults]; - ZBarSymbol *symbol = nil; - for(symbol in results) - // EXAMPLE: just grab the first barcode - break; - - // EXAMPLE: do something useful with the barcode data - resultText.text = symbol.data; - - // EXAMPLE: do something useful with the barcode image - resultImage.image = - [info objectForKey: UIImagePickerControllerOriginalImage]; - - // ADD: dismiss the controller (NB dismiss from the *reader*!) - [reader dismissModalViewControllerAnimated: YES]; -} - -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - // Release any cached data, images, etc that aren't in use. -} - -- (void)dealloc { - self.resultImage = nil; - self.resultText = nil; - [super dealloc]; -} - -@end diff -r f447fca7f811 -r e70d560835cd iphone/examples/ReaderSample/MainWindow.xib --- a/iphone/examples/ReaderSample/MainWindow.xib Wed Apr 13 14:42:08 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,444 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> - <data> - <int key="IBDocument.SystemTarget">1024</int> - <string key="IBDocument.SystemVersion">10D571</string> - <string key="IBDocument.InterfaceBuilderVersion">786</string> - <string key="IBDocument.AppKitVersion">1038.29</string> - <string key="IBDocument.HIToolboxVersion">460.00</string> - <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string key="NS.object.0">112</string> - </object> - <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> - <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="10"/> - </object> - <object class="NSArray" key="IBDocument.PluginDependencies"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - </object> - <object class="NSMutableDictionary" key="IBDocument.Metadata"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys" id="0"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - </object> - <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> - <bool key="EncodedWithXMLCoder">YES</bool> |
From: <sp...@us...> - 2012-02-22 18:31:44
|
changeset: 353:959d159c84a4 user: sp...@us... date: Thu Apr 21 15:36:44 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/959d159c84a4 description: merge readertest enhancements diffstat: iphone/ChangeLog | 3 + iphone/ZBarCaptureReader.m | 35 +++++-- iphone/ZBarReaderViewController.m | 26 +++-- iphone/examples/readertest/readertest.m | 97 ++++++++++++++++------ iphone/include/ZBarSDK/ZBarCaptureReader.h | 6 +- iphone/include/ZBarSDK/ZBarReaderViewController.h | 3 + 6 files changed, 120 insertions(+), 50 deletions(-) diffs (truncated from 413 to 300 lines): diff -r bb57dcdab006 -r 959d159c84a4 iphone/ChangeLog --- a/iphone/ChangeLog Wed Apr 20 18:36:36 2011 -0700 +++ b/iphone/ChangeLog Thu Apr 21 15:36:44 2011 -0700 @@ -1,4 +1,7 @@ current: + * add readertest fixed zoom stops + * add manual frame capture + - readertest save as PNG * enhance readertest to support default/demo pre-config and distribution * updates for Xcode 4 * expose tracking box color diff -r bb57dcdab006 -r 959d159c84a4 iphone/ZBarCaptureReader.m --- a/iphone/ZBarCaptureReader.m Wed Apr 20 18:36:36 2011 -0700 +++ b/iphone/ZBarCaptureReader.m Thu Apr 21 15:36:44 2011 -0700 @@ -32,6 +32,13 @@ #define MODULE ZBarCaptureReader #import "debug.h" +enum { + STOPPED = 0, + RUNNING = 1, + PAUSED = 2, + CAPTURE = 4, +}; + @implementation ZBarCaptureReader @synthesize captureOutput, captureDelegate, scanner, scanCrop, size, @@ -129,17 +136,19 @@ - (BOOL) enableReader { - return(!OSAtomicCompareAndSwap32Barrier(0, 0, &running)); + return(OSAtomicOr32Barrier(0, &state) & RUNNING); } - (void) setEnableReader: (BOOL) enable { if(!enable) - OSAtomicAnd32OrigBarrier(0, (void*)&running); - else if(OSAtomicCompareAndSwap32Barrier(0, 1, &running)) + OSAtomicAnd32Barrier(STOPPED, &state); + else if(!(OSAtomicOr32OrigBarrier(RUNNING, &state) & RUNNING)) { + OSAtomicAnd32Barrier(~PAUSED, &state); @synchronized(scanner) { scanner.enableCache = enableCache; } + } } - (void) willStartRunning @@ -159,6 +168,11 @@ } } +- (void) captureFrame +{ + OSAtomicOr32(CAPTURE, &state); +} + - (void) setCaptureDelegate: (id<ZBarCaptureDelegate>) delegate { @synchronized(scanner) { @@ -197,7 +211,7 @@ [captureDelegate captureReader: self didReadNewSymbolsFromImage: img]; - OSAtomicCompareAndSwap32Barrier(2, 1, &running); + OSAtomicAnd32Barrier(~PAUSED, &state); zlog(@"latency: delegate=%gs total=%gs", timer_elapsed(t_start, timer_now()), timer_elapsed(t_scan, timer_now())); @@ -231,7 +245,8 @@ { // queue is apparently not flushed when stopping; // only process when running - if(!OSAtomicCompareAndSwap32Barrier(1, 1, &running)) + uint32_t _state = OSAtomicOr32Barrier(0, &state); + if((_state & (PAUSED | RUNNING)) != RUNNING) return; NSAutoreleasePool *pool = [NSAutoreleasePool new]; @@ -317,17 +332,17 @@ // return unfiltered results for tracking feedback syms.filterSymbols = NO; int nraw = syms.count; - if(nraw > 0) - zlog(@"scan image: %dx%d crop=%@ ngood=%d nraw=%d", - w, h, NSStringFromCGRect(image.crop), ngood, nraw); + if(nraw > 0 || (_state & CAPTURE)) + zlog(@"scan image: %dx%d crop=%@ ngood=%d nraw=%d st=%d", + w, h, NSStringFromCGRect(image.crop), ngood, nraw, _state); - if(ngood) { + if(ngood || (_state & CAPTURE)) { // copy image data so we can release the buffer result.size = CGSizeMake(w, h); result.pixelBuffer = buf; result.symbols = syms; t_scan = now; - OSAtomicCompareAndSwap32Barrier(1, 2, &running); + OSAtomicXor32Barrier((_state & CAPTURE) | PAUSED, &state); [self performSelectorOnMainThread: @selector(didReadNewSymbolsFromImage:) withObject: result diff -r bb57dcdab006 -r 959d159c84a4 iphone/ZBarReaderViewController.m --- a/iphone/ZBarReaderViewController.m Wed Apr 20 18:36:36 2011 -0700 +++ b/iphone/ZBarReaderViewController.m Thu Apr 21 15:36:44 2011 -0700 @@ -23,6 +23,7 @@ #import <ZBarSDK/ZBarReaderViewController.h> #import <ZBarSDK/ZBarReaderView.h> +#import <ZBarSDK/ZBarCaptureReader.h> #import <ZBarSDK/ZBarHelpController.h> #define MODULE ZBarReaderViewController @@ -125,6 +126,12 @@ toolbar.frame = r; toolbar.barStyle = UIBarStyleBlackOpaque; + UIButton *info = + [UIButton buttonWithType: UIButtonTypeInfoLight]; + [info addTarget: self + action: @selector(info) + forControlEvents: UIControlEventTouchUpInside]; + toolbar.items = [NSArray arrayWithObjects: [[[UIBarButtonItem alloc] @@ -137,20 +144,13 @@ target: nil action: nil] autorelease], + [[[UIBarButtonItem alloc] + initWithCustomView: info] + autorelease], nil]; [controls addSubview: toolbar]; [toolbar release]; - UIButton *info = - [UIButton buttonWithType: UIButtonTypeInfoLight]; - r.origin.x = r.size.width - 54; - r.size.width = 54; - info.frame = r; - [info addTarget: self - action: @selector(info) - forControlEvents: UIControlEventTouchUpInside]; - [controls addSubview: info]; - [view addSubview: controls]; } @@ -319,6 +319,12 @@ [UIView commitAnimations]; } +- (void) takePicture +{ + if(readerView) + [readerView.captureReader captureFrame]; +} + // ZBarHelpDelegate - (void) helpControllerDidFinish: (ZBarHelpController*) help diff -r bb57dcdab006 -r 959d159c84a4 iphone/examples/readertest/readertest.m --- a/iphone/examples/readertest/readertest.m Wed Apr 20 18:36:36 2011 -0700 +++ b/iphone/examples/readertest/readertest.m Thu Apr 21 15:36:44 2011 -0700 @@ -30,6 +30,10 @@ 3, 2, 1, 0, 4, -1 }; +static const CGFloat const zoom_choices[] = { + 1, 10/9., 10/8., 8/6., 10/7., 9/6., 10/6., 7/4., 2, 0, -1 +}; + @interface AppDelegate : UITableViewController < UIApplicationDelegate, @@ -43,7 +47,7 @@ UINavigationController *nav; NSSet *defaultSymbologies; - CGFloat defaultZoom; + CGFloat zoom; NSMutableArray *sections, *symbolEnables; NSInteger xDensity, yDensity; @@ -85,7 +89,7 @@ // apply defaults for demo ZBarImageScanner *scanner = reader.scanner; continuous = NO; - defaultZoom = 1; + zoom = 1; reader.showsZBarControls = NO; reader.scanCrop = CGRectMake(0, .35, 1, .3); @@ -177,6 +181,13 @@ target: self action: @selector(manualCapture)]; + + UIButton *info = + [UIButton buttonWithType: UIButtonTypeInfoLight]; + [info addTarget: self + action: @selector(info) + forControlEvents: UIControlEventTouchUpInside]; + toolbar.items = [NSArray arrayWithObjects: [[[UIBarButtonItem alloc] @@ -206,18 +217,12 @@ target: nil action: nil] autorelease], + [[[UIBarButtonItem alloc] + initWithCustomView: info] + autorelease], nil]; [overlay addSubview: toolbar]; [toolbar release]; - - - UIButton *info = - [UIButton buttonWithType: UIButtonTypeInfoLight]; - info.frame = CGRectMake(266, 0, 54, 54); - [info addTarget: self - action: @selector(info) - forControlEvents: UIControlEventTouchUpInside]; - [overlay addSubview: info]; } - (void) updateCropMask @@ -340,14 +345,6 @@ [sections replaceObjectAtIndex: CONFIG_SECTION withObject: configs]; - UITableViewCell *cropCell = - [[[UITableViewCell alloc] - initWithStyle: UITableViewCellStyleValue1 - reuseIdentifier: nil] - autorelease]; - cropCell.textLabel.text = @"scanCrop"; - cropCell.detailTextLabel.text = NSStringFromCGRect(reader.scanCrop); - UITableViewCell *xDensityCell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleValue1 @@ -368,11 +365,29 @@ yDensityCell.detailTextLabel.text = [NSString stringWithFormat: @"%d", yDensity]; + UITableViewCell *cropCell = + [[[UITableViewCell alloc] + initWithStyle: UITableViewCellStyleValue1 + reuseIdentifier: nil] + autorelease]; + cropCell.textLabel.text = @"scanCrop"; + cropCell.detailTextLabel.text = NSStringFromCGRect(reader.scanCrop); + + UITableViewCell *zoomCell = + [[[UITableViewCell alloc] + initWithStyle: UITableViewCellStyleValue1 + reuseIdentifier: nil] + autorelease]; + zoomCell.textLabel.text = @"zoom"; + zoomCell.detailTextLabel.text = + [NSString stringWithFormat: @"%g", zoom]; + [sections replaceObjectAtIndex: CUSTOM_SECTION withObject: [NSArray arrayWithObjects: xDensityCell, yDensityCell, cropCell, + zoomCell, [self cellWithTitle: @"continuous" tag: 1 checked: continuous], @@ -509,13 +524,14 @@ [self.tableView reloadData]; if([reader respondsToSelector: @selector(readerView)]) { reader.readerView.showsFPS = YES; - if(defaultZoom) - reader.readerView.zoom = defaultZoom; + if(zoom) + reader.readerView.zoom = zoom; } if(reader.sourceType == UIImagePickerControllerSourceTypeCamera) reader.cameraOverlayView = (reader.showsZBarControls) ? nil : overlay; manualBtn.enabled = TARGET_IPHONE_SIMULATOR || - (reader.cameraMode == ZBarReaderControllerCameraModeDefault); + (reader.cameraMode == ZBarReaderControllerCameraModeDefault) || + [reader isKindOfClass: [ZBarReaderViewController class]]; [self presentModalViewController: reader animated: YES]; } @@ -641,6 +657,19 @@ [self updateCropMask]; } |
From: <sp...@us...> - 2012-02-22 18:31:44
|
changeset: 351:12f07c808986 user: sp...@us... date: Sun Apr 17 20:02:05 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/12f07c808986 description: Codabar reliability enhancements - fix missing check - require minimum quality - bump default uncertainty diffstat: ChangeLog | 4 ++++ zbar/decoder/codabar.c | 4 ++++ zbar/img_scanner.c | 19 ++++++++++++------- 3 files changed, 20 insertions(+), 7 deletions(-) diffs (69 lines): diff -r e70d560835cd -r 12f07c808986 ChangeLog --- a/ChangeLog Thu Apr 14 17:16:48 2011 -0700 +++ b/ChangeLog Sun Apr 17 20:02:05 2011 -0700 @@ -1,4 +1,8 @@ current: + * Codabar reliability enhancements + - fix missing check + - require minimum quality + - bump default uncertainty * tweak Codabar bar/space ratio validation * finish Codabar support for python, perl, java and iPhone interfaces - reduce Codabar uncertainty to minimum diff -r e70d560835cd -r 12f07c808986 zbar/decoder/codabar.c --- a/zbar/decoder/codabar.c Thu Apr 14 17:16:48 2011 -0700 +++ b/zbar/decoder/codabar.c Sun Apr 17 20:02:05 2011 -0700 @@ -172,6 +172,10 @@ dbprintf(2, " [2space inner ratios]"); return(-1); } + if((ispc >> 8) == 4) { + dbprintf(2, " [space comb]"); + return(-1); + } ispc >>= 10; dbprintf(2, "(%d)", ispc); unsigned ic = ispc * 4 + ibar; diff -r e70d560835cd -r 12f07c808986 zbar/img_scanner.c --- a/zbar/img_scanner.c Thu Apr 14 17:16:48 2011 -0700 +++ b/zbar/img_scanner.c Sun Apr 17 20:02:05 2011 -0700 @@ -493,7 +493,7 @@ zbar_image_scanner_set_config(iscn, ZBAR_CODE128, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_CODE93, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_CODE39, ZBAR_CFG_UNCERTAINTY, 0); - zbar_image_scanner_set_config(iscn, ZBAR_CODABAR, ZBAR_CFG_UNCERTAINTY, 0); + zbar_image_scanner_set_config(iscn, ZBAR_CODABAR, ZBAR_CFG_UNCERTAINTY, 1); zbar_image_scanner_set_config(iscn, ZBAR_COMPOSITE, ZBAR_CFG_UNCERTAINTY, 0); return(iscn); } @@ -816,8 +816,11 @@ for(symp = &syms->head; *symp; ) { zbar_symbol_t *sym = *symp; if((sym->type < ZBAR_COMPOSITE && sym->type > ZBAR_PARTIAL) || - (sym->type == ZBAR_DATABAR || sym->type == ZBAR_DATABAR_EXP)) { - if(filter && sym->quality < 4) { + sym->type == ZBAR_DATABAR || + sym->type == ZBAR_DATABAR_EXP || + sym->type == ZBAR_CODABAR) + { + if((sym->type == ZBAR_CODABAR || filter) && sym->quality < 4) { /* recycle */ *symp = sym->next; syms->nsyms--; @@ -825,10 +828,12 @@ _zbar_image_scanner_recycle_syms(iscn, sym); continue; } - else if(sym->type > ZBAR_EAN5) - nean++; - else - naddon++; + else if(sym->type < ZBAR_COMPOSITE) { + if(sym->type > ZBAR_EAN5) + nean++; + else + naddon++; + } } symp = &sym->next; } |
From: <sp...@us...> - 2012-02-22 18:31:43
|
changeset: 349:f447fca7f811 user: sp...@us... date: Wed Apr 13 14:42:08 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/f447fca7f811 description: tweak Codabar bar/space ratio validation diffstat: ChangeLog | 1 + zbar/decoder/codabar.c | 103 ++++++++++++++++++++++++++++++++++++------------ 2 files changed, 78 insertions(+), 26 deletions(-) diffs (181 lines): diff -r b6d52568b2fe -r f447fca7f811 ChangeLog --- a/ChangeLog Sun Apr 10 10:29:10 2011 -0700 +++ b/ChangeLog Wed Apr 13 14:42:08 2011 -0700 @@ -1,4 +1,5 @@ current: + * tweak Codabar bar/space ratio validation * finish Codabar support for python, perl, java and iPhone interfaces - reduce Codabar uncertainty to minimum * add core support for Codabar symbology diff -r b6d52568b2fe -r f447fca7f811 zbar/decoder/codabar.c --- a/zbar/decoder/codabar.c Sun Apr 10 10:29:10 2011 -0700 +++ b/zbar/decoder/codabar.c Wed Apr 13 14:42:08 2011 -0700 @@ -78,20 +78,42 @@ unsigned wbmax = get_width(dcode, ibar & 0xf); unsigned wbmin = get_width(dcode, ibar >> 12); if(8 * wbmin < wbmax || - 8 * wbmin > 5 * wbmax) + 3 * wbmin > 2 * wbmax) { - dbprintf(2, " [bar ratio]"); + dbprintf(2, " [bar outer ratio]"); return(-1); } - if(8 * get_width(dcode, (ibar >> 4) & 0xf) < 5 * wbmax) - // single wide bar combinations + unsigned wb1 = get_width(dcode, (ibar >> 8) & 0xf); + unsigned wb2 = get_width(dcode, (ibar >> 4) & 0xf); + unsigned long b0b3 = wbmin * wbmax; + unsigned long b1b2 = wb1 * wb2; + if(b1b2 + b1b2 / 8 < b0b3) { + /* single wide bar combinations */ + if(8 * wbmin < 5 * wb1 || + 8 * wb1 < 5 * wb2 || + 4 * wb2 > 3 * wbmax || + wb2 * wb2 >= wb1 * wbmax) + { + dbprintf(2, " [1bar inner ratios]"); + return(-1); + } ibar = (ibar >> 1) & 0x3; - else if(8 * get_width(dcode, (ibar >> 8) & 0xf) >= 5 * wbmax) - // three wide bars, no wide spaces + } + else if(b1b2 > b0b3 + b0b3 / 8) { + /* three wide bars, no wide spaces */ + if(4 * wbmin > 3 * wb1 || + 8 * wb1 < 5 * wb2 || + 8 * wb2 < 5 * wbmax || + wbmin * wb2 >= wb1 * wb1) + { + dbprintf(2, " [3bar inner ratios]"); + return(-1); + } ibar = (ibar >> 13) + 4; + } else { - dbprintf(2, " [bar comb]"); + dbprintf(2, " [bar inner ratios]"); return(-1); } @@ -102,9 +124,12 @@ unsigned wsmid = get_width(dcode, (ispc >> 4) & 0xf); unsigned wsmin = get_width(dcode, (ispc >> 8) & 0xf); if(ibar >> 2) { - // verify no wide spaces - if(wsmin * 8 < wsmax * 3) { - dbprintf(2, " [space comb0]"); + /* verify no wide spaces */ + if(8 * wsmin < wsmax || + 8 * wsmin < 5 * wsmid || + 8 * wsmid < 5 * wsmax) + { + dbprintf(2, " [0space inner ratios]"); return(-1); } ibar &= 0x3; @@ -114,12 +139,23 @@ dbprintf(2, " ex[%d]=%x", ibar, c); return(c); } - else if(8 * wsmin > 5 * wsmax) { - dbprintf(2, " [space comb1]"); + else if(8 * wsmin < wsmax || + 3 * wsmin > 2 * wsmax) + { + dbprintf(2, " [space outer ratio]"); return(-1); } - else if(8 * wsmid < 5 * wsmax) { - // single wide space + + unsigned long s0s2 = wsmin * wsmax; + unsigned long s1s1 = wsmid * wsmid; + if(s1s1 + s1s1 / 8 < s0s2) { + /* single wide space */ + if(8 * wsmin < 5 * wsmid || + 4 * wsmid > 3 * wsmax) + { + dbprintf(2, " [1space inner ratios]"); + return(-1); + } ispc = ((ispc & 0xf) >> 1) - 1; unsigned ic = (ispc << 2) | ibar; if(codabar->direction) @@ -128,8 +164,14 @@ dbprintf(2, "(%d) lo[%d]=%x", ispc, ic, c); return(c); } - else if(8 * wsmin < 5 * wsmid) { - // two wide spaces, check start/stop + else if(s1s1 > s0s2 + s0s2 / 8) { + /* two wide spaces, check start/stop */ + if(4 * wsmin > 3 * wsmid || + 8 * wsmid < 5 * wsmax) + { + dbprintf(2, " [2space inner ratios]"); + return(-1); + } ispc >>= 10; dbprintf(2, "(%d)", ispc); unsigned ic = ispc * 4 + ibar; @@ -144,7 +186,7 @@ return(c); } else { - dbprintf(2, " [space ratio]"); + dbprintf(2, " [space inner ratios]"); return(-1); } } @@ -177,11 +219,13 @@ /* require 2 wide and 1 narrow spaces */ unsigned wsmax = get_width(dcode, ispc & 0xf); + unsigned wsmin = get_width(dcode, ispc >> 8); unsigned wsmid = get_width(dcode, (ispc >> 4) & 0xf); - unsigned wsmin = get_width(dcode, ispc >> 8); if(8 * wsmin < wsmax || - 8 * wsmin > 5 * wsmax || - 8 * wsmid < 5 * wsmax) + 3 * wsmin > 2 * wsmax || + 4 * wsmin > 3 * wsmid || + 8 * wsmid < 5 * wsmax || + wsmid * wsmid <= wsmax * wsmin) { dbprintf(2, " [space ratio]\n"); return(ZBAR_NONE); @@ -193,18 +237,25 @@ unsigned ibar = decode_sortn(dcode, 4, 1); dbprintf(2, " bar=%04x", ibar); - /* require 1 wide & 3 narrow bars */ unsigned wbmax = get_width(dcode, ibar & 0xf); unsigned wbmin = get_width(dcode, ibar >> 12); if(8 * wbmin < wbmax || - 8 * wbmin > 5 * wbmax) + 3 * wbmin > 2 * wbmax) { - dbprintf(2, " [bar0 ratio]\n"); + dbprintf(2, " [bar outer ratio]\n"); return(ZBAR_NONE); } - unsigned wbmid = get_width(dcode, (ibar >> 4) & 0xf); - if(8 * wbmid > 5 * wbmax) { - dbprintf(2, " [bar2 ratio]\n"); + + /* require 1 wide & 3 narrow bars */ + unsigned wb1 = get_width(dcode, (ibar >> 8) & 0xf); + unsigned wb2 = get_width(dcode, (ibar >> 4) & 0xf); + if(8 * wbmin < 5 * wb1 || + 8 * wb1 < 5 * wb2 || + 4 * wb2 > 3 * wbmax || + wb1 * wb2 >= wbmin * wbmax || + wb2 * wb2 >= wb1 * wbmax) + { + dbprintf(2, " [bar inner ratios]\n"); return(ZBAR_NONE); } ibar = ((ibar & 0xf) - 1) >> 1; |
From: <sp...@us...> - 2012-02-22 18:31:43
|
changeset: 347:5f3f4c54506f user: sp...@us... date: Sat Apr 09 18:31:42 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/5f3f4c54506f description: add core support for Codabar symbology - TBD: python, perl, java and iPhone interfaces diffstat: ChangeLog | 2 + README | 6 +- README.windows | 2 +- configure.ac | 5 +- doc/ref/commonoptions.xml | 17 +- doc/ref/zbarcam.xml | 4 +- doc/ref/zbarimg.xml | 4 +- include/zbar.h | 1 + test/test_decode.c | 134 +++++++++++++++- zbar/Makefile.am.inc | 3 + zbar/config.c | 2 + zbar/decoder.c | 34 +++- zbar/decoder.h | 58 ++++++ zbar/decoder/codabar.c | 382 ++++++++++++++++++++++++++++++++++++++++++++++ zbar/decoder/codabar.h | 51 ++++++ zbar/decoder/databar.c | 6 +- zbar/img_scanner.c | 2 +- zbar/symbol.c | 3 +- zbar/symbol.h | 2 +- zbarimg/zbarimg.c | 4 +- 20 files changed, 688 insertions(+), 34 deletions(-) diffs (truncated from 1042 to 300 lines): diff -r 3390406308e9 -r 5f3f4c54506f ChangeLog --- a/ChangeLog Sun Feb 27 02:17:22 2011 -0500 +++ b/ChangeLog Sat Apr 09 18:31:42 2011 -0700 @@ -1,4 +1,6 @@ current: + * add core support for Codabar symbology + - TBD: python, perl, java and iPhone interfaces * fix EAN addon enables * fix zbarimg to accept autodetected stdin (lone dash) * fix Qt 4.6.3 compilation error (patch #3178244) diff -r 3390406308e9 -r 5f3f4c54506f README --- a/README Sun Feb 27 02:17:22 2011 -0500 +++ b/README Sat Apr 09 18:31:42 2011 -0700 @@ -4,9 +4,9 @@ ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, -Code 39, Interleaved 2 of 5 and QR Code. Included with the library -are basic applications for decoding captured bar code images and using -a video device (eg, webcam) as a bar code scanner. For application +Code 39, Codabar, Interleaved 2 of 5 and QR Code. Included with the +library are basic applications for decoding captured bar code images and +using a video device (eg, webcam) as a bar code scanner. For application developers, language bindings are included for C, C++, Python and Perl as well as GUI widgets for Qt, GTK and PyGTK. diff -r 3390406308e9 -r 5f3f4c54506f README.windows --- a/README.windows Sun Feb 27 02:17:22 2011 -0500 +++ b/README.windows Sat Apr 09 18:31:42 2011 -0700 @@ -4,7 +4,7 @@ ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 93, Code 39, -Interleaved 2 of 5 and QR Code. Included with the library are basic +Codabar, Interleaved 2 of 5 and QR Code. Included with the library are basic applications for decoding captured bar code images and using a video device (eg, webcam) as a bar code scanner. For application developers, language bindings are included for C, C++, Python and Perl as well as GUI widgets for diff -r 3390406308e9 -r 5f3f4c54506f configure.ac --- a/configure.ac Sun Feb 27 02:17:22 2011 -0500 +++ b/configure.ac Sat Apr 09 18:31:42 2011 -0700 @@ -107,9 +107,9 @@ AC_ARG_ENABLE([codes], [AS_HELP_STRING([--enable-codes=SYMS], - [select symbologies to compile [default=ean,databar,code128,code93,code39,i25,qrcode]])], + [select symbologies to compile [default=ean,databar,code128,code93,code39,codabar,i25,qrcode]])], [], - [enable_codes="ean,databar,code128,code93,code39,i25,qrcode"]) + [enable_codes="ean,databar,code128,code93,code39,codabar,i25,qrcode"]) AC_DEFUN([ZBAR_CHK_CODE], [ AC_MSG_CHECKING([whether to build $2]) @@ -131,6 +131,7 @@ ZBAR_CHK_CODE([code128], [Code 128 symbology]) ZBAR_CHK_CODE([code93], [Code 93 symbology]) ZBAR_CHK_CODE([code39], [Code 39 symbology]) +ZBAR_CHK_CODE([codabar], [Codabar symbology]) ZBAR_CHK_CODE([i25], [Interleaved 2 of 5 symbology]) ZBAR_CHK_CODE([qrcode], [QR Code]) ZBAR_CHK_CODE([pdf417], [PDF417 symbology]) diff -r 3390406308e9 -r 5f3f4c54506f doc/ref/commonoptions.xml --- a/doc/ref/commonoptions.xml Sun Feb 27 02:17:22 2011 -0500 +++ b/doc/ref/commonoptions.xml Sat Apr 09 18:31:42 2011 -0700 @@ -47,9 +47,9 @@ <option>ean13</option>, <option>ean8</option>, <option>upca</option>, <option>upce</option>, <option>isbn13</option>, <option>isbn10</option>, - <option>i25</option>, <option>code39</option>, <option>code93</option>, - <option>code128</option>, <option>qrcode</option> - or the special value <option>*</option>. + <option>i25</option>, <option>codabar</option>, <option>code39</option>, + <option>code93</option>, <option>code128</option>, + <option>qrcode</option> or the special value <option>*</option>. If <replaceable class="parameter">symbology</replaceable> is omitted or <option>*</option>, the <replaceable class="parameter">config</replaceable> will be set for all @@ -129,11 +129,12 @@ If a decode result is outside the configured min/max range (inclusive), it will not be reported. Set to 0 to disable the corresponding check. This setting applies to variable-length - symbologies: <option>i25</option>, <option>code39</option>, - <option>code128</option> and <option>pdf417</option>. - <option>min-length</option> defaults to 6 for <option>i25</option> - and 1 for <option>code39</option> (per Code 39 autodiscrimination - recommendation); all others default to 0</simpara> + symbologies: <option>i25</option>, <option>codabar</option>, + <option>code39</option>, <option>code128</option> and + <option>pdf417</option>. <option>min-length</option> defaults to 6 + for <option>i25</option> and 1 for <option>code39</option> (per Code + 39 autodiscrimination recommendation); all others default to + 0</simpara> </listitem> </varlistentry> diff -r 3390406308e9 -r 5f3f4c54506f doc/ref/zbarcam.xml --- a/doc/ref/zbarcam.xml Sun Feb 27 02:17:22 2011 -0500 +++ b/doc/ref/zbarcam.xml Sat Apr 09 18:31:42 2011 -0700 @@ -61,8 +61,8 @@ <para>The underlying library currently supports EAN-13 (including UPC and ISBN subsets), EAN-8, DataBar, DataBar Expanded, Code 128, - Code 93, Code 39, Interleaved 2 of 5 and QR Code symbologies. The - specific type of each detected symbol is printed with the decoded + Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code symbologies. + The specific type of each detected symbol is printed with the decoded data.</para> </refsection> diff -r 3390406308e9 -r 5f3f4c54506f doc/ref/zbarimg.xml --- a/doc/ref/zbarimg.xml Sun Feb 27 02:17:22 2011 -0500 +++ b/doc/ref/zbarimg.xml Sat Apr 09 18:31:42 2011 -0700 @@ -60,8 +60,8 @@ <para>The underlying library currently supports EAN-13 (including UPC and ISBN subsets), EAN-8, DataBar, DataBar Expanded, Code 128, - Code 93, Code 39, Interleaved 2 of 5 and QR Code symbologies. The - specific type of each detected symbol is printed with the decoded + Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code symbologies. + The specific type of each detected symbol is printed with the decoded data.</para> <para>Note that "<filename><replaceable>image</replaceable></filename>" diff -r 3390406308e9 -r 5f3f4c54506f include/zbar.h --- a/include/zbar.h Sun Feb 27 02:17:22 2011 -0500 +++ b/include/zbar.h Sat Apr 09 18:31:42 2011 -0700 @@ -98,6 +98,7 @@ ZBAR_I25 = 25, /**< Interleaved 2 of 5. @since 0.4 */ ZBAR_DATABAR = 34, /**< GS1 DataBar (RSS). @since 0.11 */ ZBAR_DATABAR_EXP = 35, /**< GS1 DataBar Expanded. @since 0.11 */ + ZBAR_CODABAR = 38, /**< Codabar. @since 0.11 */ ZBAR_CODE39 = 39, /**< Code 39. @since 0.4 */ ZBAR_PDF417 = 57, /**< PDF417. @since 0.6 */ ZBAR_QRCODE = 64, /**< QR Code. @since 0.10 */ diff -r 3390406308e9 -r 5f3f4c54506f test/test_decode.c --- a/test/test_decode.c Sun Feb 27 02:17:22 2011 -0500 +++ b/test/test_decode.c Sat Apr 09 18:31:42 2011 -0700 @@ -508,6 +508,105 @@ #endif /*------------------------------------------------------------*/ +/* Codabar encoding */ + +static const unsigned int codabar[20] = { + 0x03, 0x06, 0x09, 0x60, 0x12, 0x42, 0x21, 0x24, + 0x30, 0x48, 0x0c, 0x18, 0x45, 0x51, 0x54, 0x15, + 0x1a, 0x29, 0x0b, 0x0e, +}; + +static const char codabar_char[0x14] = + "0123456789-$:/.+ABCD"; + +/* FIXME configurable/randomized ratio, ics */ +/* FIXME check digit option */ + +static char *convert_codabar (char *src) +{ + unsigned len = strlen(src); + char tmp[4] = { 0, }; + if(len < 2) { + unsigned delim = rand() >> 8; + tmp[0] = delim & 3; + if(len) + tmp[1] = src[0]; + tmp[len + 1] = (delim >> 2) & 3; + len += 2; + src = tmp; + } + + char *result = malloc(len + 1); + char *dst = result; + *(dst++) = ((*(src++) - 1) & 0x3) + 'A'; + for(len--; len > 1; len--) { + char c = *(src++); + if(c >= '0' && c <= '9') + *(dst++) = c; + else if(c == '-' || c == '$' || c == ':' || c == '/' || + c == '.' || c == '+') + *(dst++) = c; + else + *(dst++) = codabar_char[c % 0x10]; + } + *(dst++) = ((*(src++) - 1) & 0x3) + 'A'; + *dst = 0; + return(result); +} + +static void encode_codachar (unsigned char c, + unsigned ics, + int dir) +{ + unsigned int idx; + if(c >= '0' && c <= '9') + idx = c - '0'; + else if(c >= 'A' && c <= 'D') + idx = c - 'A' + 0x10; + else + switch(c) + { + case '-': idx = 0xa; break; + case '$': idx = 0xb; break; + case ':': idx = 0xc; break; + case '/': idx = 0xd; break; + case '.': idx = 0xe; break; + case '+': idx = 0xf; break; + default: + assert(0); + } + + assert(idx < 0x14); + unsigned int raw = codabar[idx]; + + uint32_t enc = 0; + int j; + for(j = 0; j < 7; j++, raw <<= 1) + enc = (enc << 4) | ((raw & 0x40) ? 3 : 1); + zprintf(3, " encode '%c': %07x: ", c, enc); + if(dir) + enc = (enc << 4) | ics; + else + enc |= ics << 28; + encode(enc, 1 - dir); +} + +static void encode_codabar (char *data, + int dir) +{ + assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); + print_sep(3); + zprintf(2, "CODABAR: %s\n", data); + encode(0xa, 0); /* leading quiet */ + int i, n = strlen(data); + for(i = 0; i < n; i++) { + int j = (dir) ? i : n - i - 1; + encode_codachar(data[j], (i < n - 1) ? 1 : 0xa, dir); + } + print_sep(3); +} + +/*------------------------------------------------------------*/ /* Interleaved 2 of 5 encoding */ static const unsigned char i25[10] = { @@ -1017,13 +1116,22 @@ encode_i25(data, FWD); encode_junk(rnd_size); - #if 0 /* FIXME encoding broken */ encode_i25(data, REV); encode_junk(rnd_size); #endif + char *cdb = convert_codabar(data); + expect(ZBAR_CODABAR, cdb); + encode_codabar(cdb, FWD); + encode_junk(rnd_size); + + expect(ZBAR_CODABAR, cdb); + encode_codabar(cdb, REV); + encode_junk(rnd_size); + free(cdb); + calc_ean_parity(data + 2, 12); expect(ZBAR_EAN13, data + 2); encode_ean13(data + 2); @@ -1067,7 +1175,16 @@ encode_junk(rnd_size); - /*encode_code39("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%");*/ + char *cdb = convert_codabar(data); + expect(ZBAR_CODABAR, cdb); + encode_codabar(cdb, FWD); + encode_junk(rnd_size); + + expect(ZBAR_CODABAR, cdb); + encode_codabar(cdb, REV); + encode_junk(rnd_size); + free(cdb); + convert_code39(data); expect(ZBAR_CODE39, data); encode_code39(data); @@ -1091,6 +1208,14 @@ seed = 0xbabeface; zprintf(1, "[%d] SEED=%d\n", iter++, seed); srand(seed); + if(/* EAN-2 within DataBar (020596539169270) + * (FIXME require COMPOSITE for addons) + */ + seed == -862734747) + { + zprintf(2, " FIXME known failure\n"); + return(2); + } int i; char data[32] = { 0, }; |
From: <sp...@us...> - 2012-02-22 18:31:43
|
changeset: 348:b6d52568b2fe user: sp...@us... date: Sun Apr 10 10:29:10 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/b6d52568b2fe description: finish Codabar support for python, perl, java and iPhone interfaces - reduce Codabar uncertainty to minimum diffstat: ChangeLog | 2 ++ iphone/README | 6 +++--- iphone/doc/ZBarSymbol.rst | 3 +++ iphone/examples/readertest/readertest.m | 4 ++-- iphone/include/config.h | 3 +++ iphone/res/zbar-help.html | 1 + iphone/zbar.xcodeproj/project.pbxproj | 6 ++++++ java/net/sourceforge/zbar/Symbol.java | 6 ++++-- perl/README | 4 ++-- perl/ZBar.pm | 4 ++-- perl/ZBar.xs | 3 ++- perl/ZBar/Symbol.pod | 2 ++ python/README | 4 ++-- python/test/test_zbar.py | 1 + python/zbarmodule.c | 1 + zbar/img_scanner.c | 2 +- 16 files changed, 37 insertions(+), 15 deletions(-) diffs (244 lines): diff -r 5f3f4c54506f -r b6d52568b2fe ChangeLog --- a/ChangeLog Sat Apr 09 18:31:42 2011 -0700 +++ b/ChangeLog Sun Apr 10 10:29:10 2011 -0700 @@ -1,4 +1,6 @@ current: + * finish Codabar support for python, perl, java and iPhone interfaces + - reduce Codabar uncertainty to minimum * add core support for Codabar symbology - TBD: python, perl, java and iPhone interfaces * fix EAN addon enables diff -r 5f3f4c54506f -r b6d52568b2fe iphone/README --- a/iphone/README Sat Apr 09 18:31:42 2011 -0700 +++ b/iphone/README Sun Apr 10 10:29:10 2011 -0700 @@ -4,9 +4,9 @@ ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, DataBar, -Code 128, Code 93, Code 39, Interleaved 2 of 5 and QR Code. These are -the Objective C wrappers and integrated widget for developing with the -library on the iPhone platform. +Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. +These are the Objective C wrappers and integrated widget for developing +with the library on the iPhone platform. Check the ZBar project home page for the latest release, forums, etc. diff -r 5f3f4c54506f -r b6d52568b2fe iphone/doc/ZBarSymbol.rst --- a/iphone/doc/ZBarSymbol.rst Sat Apr 09 18:31:42 2011 -0700 +++ b/iphone/doc/ZBarSymbol.rst Sun Apr 10 10:29:10 2011 -0700 @@ -132,6 +132,9 @@ ZBAR_DATABAR_EXP GS1 DataBar Expanded + ZBAR_CODABAR + Codabar + ZBAR_CODE39 Code 39 (3 of 9) diff -r 5f3f4c54506f -r b6d52568b2fe iphone/examples/readertest/readertest.m --- a/iphone/examples/readertest/readertest.m Sat Apr 09 18:31:42 2011 -0700 +++ b/iphone/examples/readertest/readertest.m Sun Apr 10 10:29:10 2011 -0700 @@ -326,8 +326,8 @@ nil]]; static const int symbolValues[] = { - ZBAR_QRCODE, ZBAR_CODE128, ZBAR_CODE93, ZBAR_CODE39, ZBAR_I25, - ZBAR_DATABAR, ZBAR_DATABAR_EXP, + ZBAR_QRCODE, ZBAR_CODE128, ZBAR_CODE93, ZBAR_CODE39, ZBAR_CODABAR, + ZBAR_I25, ZBAR_DATABAR, ZBAR_DATABAR_EXP, ZBAR_EAN13, ZBAR_EAN8, ZBAR_EAN2, ZBAR_EAN5, ZBAR_COMPOSITE, ZBAR_UPCA, ZBAR_UPCE, diff -r 5f3f4c54506f -r b6d52568b2fe iphone/include/config.h --- a/iphone/include/config.h Sat Apr 09 18:31:42 2011 -0700 +++ b/iphone/include/config.h Sun Apr 10 10:29:10 2011 -0700 @@ -9,6 +9,9 @@ /* whether to build support for Code 39 symbology */ #define ENABLE_CODE39 1 +/* whether to build support for Codabar symbology */ +#define ENABLE_CODABAR 1 + /* whether to build support for DataBar symbology */ #define ENABLE_DATABAR 1 diff -r 5f3f4c54506f -r b6d52568b2fe iphone/res/zbar-help.html --- a/iphone/res/zbar-help.html Sat Apr 09 18:31:42 2011 -0700 +++ b/iphone/res/zbar-help.html Sun Apr 10 10:29:10 2011 -0700 @@ -46,6 +46,7 @@ <a href="http://wikipedia.org/wiki/DataBar">DataBar (RSS)</a>, <a href="http://en.wikipedia.org/wiki/Code_93">Code 93</a>, <a href="http://wikipedia.org/wiki/Code_39">Code 39</a> and +<a href="http://wikipedia.org/wiki/Codabar">Codabar</a> and <a href="http://wikipedia.org/wiki/Interleaved_2_of_5">Interleaved 2 of 5</a></p> <hr/> <p class="clear title">Hints for successful scanning</p> diff -r 5f3f4c54506f -r b6d52568b2fe iphone/zbar.xcodeproj/project.pbxproj --- a/iphone/zbar.xcodeproj/project.pbxproj Sat Apr 09 18:31:42 2011 -0700 +++ b/iphone/zbar.xcodeproj/project.pbxproj Sun Apr 10 10:29:10 2011 -0700 @@ -41,6 +41,7 @@ /* Begin PBXBuildFile section */ DC26004C118631C200FA987B /* ZBarCaptureReader.m in Sources */ = {isa = PBXBuildFile; fileRef = DC26004B118631C200FA987B /* ZBarCaptureReader.m */; }; + DC290E281351496400A9B857 /* codabar.c in Sources */ = {isa = PBXBuildFile; fileRef = DC290E261351496400A9B857 /* codabar.c */; }; DC299A9D1208B5E8006A023C /* libzbar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AAC07E0554694100DB518D /* libzbar.a */; }; DC299AA01208B61C006A023C /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC50453D1203396B009FF359 /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; DC299AA11208B61C006A023C /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC50453F1203396B009FF359 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; @@ -236,6 +237,8 @@ DC1A49A411FF33B300BCDA30 /* zbar-samples.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "zbar-samples.png"; path = "res/zbar-samples.png"; sourceTree = "<group>"; }; DC1A49C111FF537000BCDA30 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; DC26004B118631C200FA987B /* ZBarCaptureReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZBarCaptureReader.m; sourceTree = "<group>"; usesTabs = 0; }; + DC290E261351496400A9B857 /* codabar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = codabar.c; sourceTree = "<group>"; }; + DC290E271351496400A9B857 /* codabar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = codabar.h; sourceTree = "<group>"; }; DC299AF51208B7BD006A023C /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = include/config.h; sourceTree = "<group>"; }; DC299B051208FC11006A023C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DC299BEC1208FE40006A023C /* prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = prefix.pch; path = include/prefix.pch; sourceTree = "<group>"; }; @@ -530,6 +533,8 @@ DC67C12610A07AD30033B702 /* code39.h */, DC67C12710A07AD30033B702 /* ean.c */, DC67C12810A07AD30033B702 /* ean.h */, + DC290E261351496400A9B857 /* codabar.c */, + DC290E271351496400A9B857 /* codabar.h */, DC67C12910A07AD30033B702 /* i25.c */, DC67C12A10A07AD30033B702 /* i25.h */, DC67C12E10A07AD30033B702 /* qr_finder.c */, @@ -724,6 +729,7 @@ DC3CE47811FA1622008FAF88 /* ZBarReaderViewImpl_Capture.m in Sources */, DC3CE47911FA1622008FAF88 /* ZBarReaderViewImpl_Simulator.m in Sources */, DCE9900D129719F100D2655C /* code93.c in Sources */, + DC290E281351496400A9B857 /* codabar.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff -r 5f3f4c54506f -r b6d52568b2fe java/net/sourceforge/zbar/Symbol.java --- a/java/net/sourceforge/zbar/Symbol.java Sat Apr 09 18:31:42 2011 -0700 +++ b/java/net/sourceforge/zbar/Symbol.java Sun Apr 10 10:29:10 2011 -0700 @@ -53,14 +53,16 @@ public static final int DATABAR = 34; /** DataBar Expanded. */ public static final int DATABAR_EXP = 35; - /** Code 93. */ - public static final int CODE93 = 93; + /** Codabar. */ + public static final int CODABAR = 38; /** Code 39. */ public static final int CODE39 = 39; /** PDF417. */ public static final int PDF417 = 57; /** QR Code. */ public static final int QRCODE = 64; + /** Code 93. */ + public static final int CODE93 = 93; /** Code 128. */ public static final int CODE128 = 128; diff -r 5f3f4c54506f -r b6d52568b2fe perl/README --- a/perl/README Sat Apr 09 18:31:42 2011 -0700 +++ b/perl/README Sun Apr 10 10:29:10 2011 -0700 @@ -4,8 +4,8 @@ ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, -Code 93, Code 39, Interleaved 2 of 5 and QR Code. These are the Perl -bindings for the library. +Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. These are +the Perl bindings for the library. Check the ZBar project home page for the latest release, mailing lists, etc. diff -r 5f3f4c54506f -r b6d52568b2fe perl/ZBar.pm --- a/perl/ZBar.pm Sat Apr 09 18:31:42 2011 -0700 +++ b/perl/ZBar.pm Sun Apr 10 10:29:10 2011 -0700 @@ -86,8 +86,8 @@ The ZBar Bar Code Reader is a library for scanning and decoding bar codes from various sources such as video streams, image files or raw -intensity sensors. It supports EAN, UPC, Code 128, Code 39 and -Interleaved 2 of 5. +intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, +Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. These are the bindings for interacting directly with the library from Perl. diff -r 5f3f4c54506f -r b6d52568b2fe perl/ZBar.xs --- a/perl/ZBar.xs Sat Apr 09 18:31:42 2011 -0700 +++ b/perl/ZBar.xs Sun Apr 10 10:29:10 2011 -0700 @@ -339,6 +339,7 @@ CONSTANT(symbol_type, , DATABAR_EXP, zbar_get_symbol_name(ZBAR_DATABAR_EXP)); CONSTANT(symbol_type, , I25, zbar_get_symbol_name(ZBAR_I25)); + CONSTANT(symbol_type, , CODABAR, zbar_get_symbol_name(ZBAR_CODABAR)); CONSTANT(symbol_type, , CODE39, zbar_get_symbol_name(ZBAR_CODE39)); CONSTANT(symbol_type, , PDF417, zbar_get_symbol_name(ZBAR_PDF417)); CONSTANT(symbol_type, , QRCODE, zbar_get_symbol_name(ZBAR_QRCODE)); @@ -796,7 +797,7 @@ zbar_symbol_type_t symbology PPCODE: if(symbology == ZBAR_NONE) - symbology = zbar_decoder_get_type(decoder) + symbology = zbar_decoder_get_type(decoder); PUSH_ENUM_MASK(config, CFG, zbar_decoder_get_configs(decoder, symbology)); SV * diff -r 5f3f4c54506f -r b6d52568b2fe perl/ZBar/Symbol.pod --- a/perl/ZBar/Symbol.pod Sat Apr 09 18:31:42 2011 -0700 +++ b/perl/ZBar/Symbol.pod Sun Apr 10 10:29:10 2011 -0700 @@ -126,6 +126,8 @@ =item I25 +=item CODABAR + =item CODE39 =item CODE93 diff -r 5f3f4c54506f -r b6d52568b2fe python/README --- a/python/README Sat Apr 09 18:31:42 2011 -0700 +++ b/python/README Sun Apr 10 10:29:10 2011 -0700 @@ -5,8 +5,8 @@ ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, -Code 93, Code 39, Interleaved 2 of 5 and QR Code. These are the -Python bindings for the library. +Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. These are +the Python bindings for the library. Check the ZBar project home page for the latest release, mailing lists, etc. diff -r 5f3f4c54506f -r b6d52568b2fe python/test/test_zbar.py --- a/python/test/test_zbar.py Sat Apr 09 18:31:42 2011 -0700 +++ b/python/test/test_zbar.py Sun Apr 10 10:29:10 2011 -0700 @@ -89,6 +89,7 @@ zbar.Symbol.DATABAR, zbar.Symbol.DATABAR_EXP, zbar.Symbol.I25, + zbar.Symbol.CODABAR, zbar.Symbol.CODE39, zbar.Symbol.PDF417, zbar.Symbol.QRCODE, diff -r 5f3f4c54506f -r b6d52568b2fe python/zbarmodule.c --- a/python/zbarmodule.c Sat Apr 09 18:31:42 2011 -0700 +++ b/python/zbarmodule.c Sun Apr 10 10:29:10 2011 -0700 @@ -55,6 +55,7 @@ { "DATABAR", ZBAR_DATABAR }, { "DATABAR_EXP", ZBAR_DATABAR_EXP }, { "I25", ZBAR_I25 }, + { "CODABAR", ZBAR_CODABAR }, { "CODE39", ZBAR_CODE39 }, { "PDF417", ZBAR_PDF417 }, { "QRCODE", ZBAR_QRCODE }, diff -r 5f3f4c54506f -r b6d52568b2fe zbar/img_scanner.c --- a/zbar/img_scanner.c Sat Apr 09 18:31:42 2011 -0700 +++ b/zbar/img_scanner.c Sun Apr 10 10:29:10 2011 -0700 @@ -493,7 +493,7 @@ zbar_image_scanner_set_config(iscn, ZBAR_CODE128, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_CODE93, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_CODE39, ZBAR_CFG_UNCERTAINTY, 0); - zbar_image_scanner_set_config(iscn, ZBAR_CODABAR, ZBAR_CFG_UNCERTAINTY, 1); + zbar_image_scanner_set_config(iscn, ZBAR_CODABAR, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_COMPOSITE, ZBAR_CFG_UNCERTAINTY, 0); return(iscn); } |
From: <tte...@us...> - 2011-12-02 10:05:12
|
changeset: 346:ed4fa27763e9 user: tte...@us... date: Fri Dec 02 02:04:40 2011 -0800 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/ed4fa27763e9 description: Small comment fix in the QR decoder. diffstat: zbar/qrcode/qrdectxt.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (15 lines): diff -r 443c9f0e3c8f -r ed4fa27763e9 zbar/qrcode/qrdectxt.c --- a/zbar/qrcode/qrdectxt.c Mon Sep 19 10:36:29 2011 -0700 +++ b/zbar/qrcode/qrdectxt.c Fri Dec 02 02:04:40 2011 -0800 @@ -266,8 +266,9 @@ /*If there was data encoded in kanji mode, assume it's SJIS.*/ if(has_kanji)enc_list_mtf(enc_list,sjis_cd); /*Otherwise check for the UTF-8 BOM. - There's no way to specify UTF-8 using ECI, so this is the - only way for encoders to reliably indicate it.*/ + UTF-8 is rarely specified with ECI, and few decoders + currently support doing so, so this is the best way for + encoders to reliably indicate it.*/ else if(inleft>=3&& in[0]==(char)0xEF&&in[1]==(char)0xBB&&in[2]==(char)0xBF){ in+=3; |
From: <sp...@us...> - 2011-09-19 20:35:18
|
changeset: 345:443c9f0e3c8f user: sp...@us... date: Mon Sep 19 10:36:29 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/443c9f0e3c8f description: fix v4l config and build variations (bug #3348888) - thanks to jarekczek for reporting this! - NB v4l1 removed from kernel as of 2.6.38 diffstat: ChangeLog | 3 ++ configure.ac | 36 +++++++++++++++------------ test/Makefile.am.inc | 2 +- zbar/Makefile.am.inc | 9 ++++-- zbar/video/v4l.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ zbar/video/v4l1.c | 32 +----------------------- 6 files changed, 99 insertions(+), 50 deletions(-) diffs (225 lines): diff -r cd365c1a623d -r 443c9f0e3c8f ChangeLog --- a/ChangeLog Sun Sep 18 18:44:38 2011 -0700 +++ b/ChangeLog Mon Sep 19 10:36:29 2011 -0700 @@ -1,4 +1,7 @@ current: + * fix v4l config and build variations (bug #3348888) + - thanks to jarekczek for reporting this! + - NB v4l1 removed from kernel as of 2.6.38 * fix missing python thread initialization (bug #3349199) - thanks to jarekczek for reporting this problem! * fix missing configure check for Python.h (bug #3092663) diff -r cd365c1a623d -r 443c9f0e3c8f configure.ac --- a/configure.ac Sun Sep 18 18:44:38 2011 -0700 +++ b/configure.ac Mon Sep 19 10:36:29 2011 -0700 @@ -176,23 +176,26 @@ [], [enable_video="yes"]) -with_video="no" -AS_IF([test "x$enable_video" != "xno"], - [AS_IF([test "x$win32" = "xno"], - [AC_CHECK_HEADERS([linux/videodev.h], [with_video="v4l1"], - [AC_MSG_FAILURE([test for video support failed! +have_v4l1="no" +have_v4l2="no" +AS_IF([test "x$enable_video" = "xno"], + [], + [test "x$win32" = "xno"], + [AC_CHECK_HEADERS([linux/videodev.h], [have_v4l1="yes"]) + AC_CHECK_HEADERS([linux/videodev2.h], [have_v4l2="yes"]) + AS_IF([test "x$have_v4l2" = "xno" && test "x$have_v4l1" = "xno"], + [AC_MSG_FAILURE([test for video support failed! rebuild your kernel to include video4linux support or -configure --disable-video to skip building video support.])]) - AC_CHECK_HEADERS([linux/videodev2.h], [with_video="v4l2"], - [AC_MSG_WARN([v4l2 API not detected, upgrade your kernel!])])], - [AC_CHECK_HEADERS([vfw.h], [with_video="vfw"], - [AC_MSG_FAILURE([test for VfW video support failed! -configure --disable-video to skip building vidoe support.])])]) -]) +configure --disable-video to skip building video support.])], + [test "x$have_v4l2" = "xno"], + [AC_MSG_WARN([v4l2 API not detected, upgrade your kernel!])])], + [AC_CHECK_HEADERS([vfw.h], [with_video="vfw"], + [AC_MSG_FAILURE([test for VfW video support failed! +configure --disable-video to skip building video support.])])]) + AM_CONDITIONAL([HAVE_VIDEO], [test "x$enable_video" != "xno"]) -AM_CONDITIONAL([HAVE_V4L1], - [test "x$with_video" = "xv4l1" || test "x$with_video" = "xv4l2"]) -AM_CONDITIONAL([HAVE_V4L2], [test "x$with_video" = "xv4l2"]) +AM_CONDITIONAL([HAVE_V4L1], [test "x$have_v4l1" != "xno"]) +AM_CONDITIONAL([HAVE_V4L2], [test "x$have_v4l2" != "xno"]) dnl X AC_ARG_VAR([XSHM_LIBS], [linker flags for X shared memory extension]) @@ -509,7 +512,8 @@ dnl FIXME switches for shm, mmap AC_HEADER_ASSERT AC_CHECK_HEADERS([errno.h fcntl.h features.h inttypes.h stdlib.h string.h \ - unistd.h sys/ioctl.h sys/time.h sys/times.h sys/ipc.h sys/shm.h sys/mman.h]) + unistd.h sys/types.h sys/stat.h sys/ioctl.h sys/time.h sys/times.h \ + sys/ipc.h sys/shm.h sys/mman.h]) dnl types diff -r cd365c1a623d -r 443c9f0e3c8f test/Makefile.am.inc --- a/test/Makefile.am.inc Sun Sep 18 18:44:38 2011 -0700 +++ b/test/Makefile.am.inc Mon Sep 19 10:36:29 2011 -0700 @@ -84,4 +84,4 @@ check-local: check-cpp check-decoder check-images regress: regress-decoder regress-images -.PHONY: check-decoder check-images regress-decoder regress-images regress +.PHONY: check-cpp check-decoder check-images regress-decoder regress-images regress diff -r cd365c1a623d -r 443c9f0e3c8f zbar/Makefile.am.inc --- a/zbar/Makefile.am.inc Sun Sep 18 18:44:38 2011 -0700 +++ b/zbar/Makefile.am.inc Mon Sep 19 10:36:29 2011 -0700 @@ -59,11 +59,14 @@ zbar_libzbar_la_SOURCES += zbar/processor/posix.h zbar/processor/posix.c endif +if HAVE_V4L2 +zbar_libzbar_la_SOURCES += zbar/video/v4l.c zbar/video/v4l2.c +endif if HAVE_V4L1 +if !HAVE_V4L2 +zbar_libzbar_la_SOURCES += zbar/video/v4l.c +endif zbar_libzbar_la_SOURCES += zbar/video/v4l1.c -if HAVE_V4L2 -zbar_libzbar_la_SOURCES += zbar/video/v4l2.c -endif endif if WIN32 if HAVE_VIDEO diff -r cd365c1a623d -r 443c9f0e3c8f zbar/video/v4l.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zbar/video/v4l.c Mon Sep 19 10:36:29 2011 -0700 @@ -0,0 +1,67 @@ +/*------------------------------------------------------------------------ + * Copyright 2007-2011 (c) Jeff Brown <sp...@us...> + * + * This file is part of the ZBar Bar Code Reader. + * + * The ZBar Bar Code Reader is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * The ZBar Bar Code Reader is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with the ZBar Bar Code Reader; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * http://sourceforge.net/projects/zbar + *------------------------------------------------------------------------*/ + +#include <config.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef HAVE_FCNTL_H +# include <fcntl.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#include "video.h" + +extern int _zbar_v4l1_probe(zbar_video_t*); +extern int _zbar_v4l2_probe(zbar_video_t*); + +int _zbar_video_open (zbar_video_t *vdo, + const char *dev) +{ + vdo->fd = open(dev, O_RDWR); + if(vdo->fd < 0) + return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, + "opening video device '%s'", dev)); + zprintf(1, "opened camera device %s (fd=%d)\n", dev, vdo->fd); + + int rc = -1; +#ifdef HAVE_LINUX_VIDEODEV2_H + if(vdo->intf != VIDEO_V4L1) + rc = _zbar_v4l2_probe(vdo); +#endif +#ifdef HAVE_LINUX_VIDEODEV_H + if(rc && vdo->intf != VIDEO_V4L2) + rc = _zbar_v4l1_probe(vdo); +#endif + + if(rc && vdo->fd >= 0) { + close(vdo->fd); + vdo->fd = -1; + } + return(rc); +} diff -r cd365c1a623d -r 443c9f0e3c8f zbar/video/v4l1.c --- a/zbar/video/v4l1.c Sun Sep 18 18:44:38 2011 -0700 +++ b/zbar/video/v4l1.c Mon Sep 19 10:36:29 2011 -0700 @@ -1,5 +1,5 @@ /*------------------------------------------------------------------------ - * Copyright 2007-2009 (c) Jeff Brown <sp...@us...> + * Copyright 2007-2011 (c) Jeff Brown <sp...@us...> * * This file is part of the ZBar Bar Code Reader. * @@ -46,8 +46,6 @@ #include "video.h" #include "image.h" -extern int _zbar_v4l2_probe(zbar_video_t*); - typedef struct v4l1_format_s { uint32_t format; uint8_t bpp; @@ -371,7 +369,7 @@ return(0); } -static int _zbar_v4l1_probe (zbar_video_t *vdo) +int _zbar_v4l1_probe (zbar_video_t *vdo) { /* check capabilities */ struct video_capability vcap; @@ -407,29 +405,3 @@ vdo->dq = v4l1_dq; return(0); } - -int _zbar_video_open (zbar_video_t *vdo, - const char *dev) -{ - vdo->fd = open(dev, O_RDWR); - if(vdo->fd < 0) - return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, - "opening video device '%s'", dev)); - zprintf(1, "opened camera device %s (fd=%d)\n", dev, vdo->fd); - - int rc = -1; -#ifdef HAVE_LINUX_VIDEODEV2_H - if(vdo->intf != VIDEO_V4L1) - rc = _zbar_v4l2_probe(vdo); - if(rc) -#else - zprintf(1, "WARNING: not compiled with v4l2 support, trying v4l1\n"); -#endif - rc = _zbar_v4l1_probe(vdo); - - if(rc && vdo->fd >= 0) { - close(vdo->fd); - vdo->fd = -1; - } - return(rc); -} |
From: <sp...@us...> - 2011-09-19 01:46:47
|
changeset: 344:cd365c1a623d user: sp...@us... date: Sun Sep 18 18:44:38 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/cd365c1a623d description: fix missing python thread initialization (bug #3349199) - thanks to jarekczek for reporting this problem! diffstat: ChangeLog | 2 ++ python/processor.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletions(-) diffs (28 lines): diff -r 2f457756a387 -r cd365c1a623d ChangeLog --- a/ChangeLog Sun Sep 18 18:33:24 2011 -0700 +++ b/ChangeLog Sun Sep 18 18:44:38 2011 -0700 @@ -1,4 +1,6 @@ current: + * fix missing python thread initialization (bug #3349199) + - thanks to jarekczek for reporting this problem! * fix missing configure check for Python.h (bug #3092663) - thanks to Zoltan Kovacs for reporting this problem! * fix C++ wrapper missing Symbol.quality (bug #3076524) diff -r 2f457756a387 -r cd365c1a623d python/processor.c --- a/python/processor.c Sun Sep 18 18:33:24 2011 -0700 +++ b/python/processor.c Sun Sep 18 18:44:38 2011 -0700 @@ -42,7 +42,13 @@ object_to_bool, &threaded)) return(NULL); -#ifndef WITH_THREAD +#ifdef WITH_THREAD + /* the processor creates a thread that calls back into python, + * so we must ensure that threads are initialized before attempting + * to manipulate the GIL (bug #3349199) + */ + PyEval_InitThreads(); +#else if(threaded > 0 && PyErr_WarnEx(NULL, "threading requested but not available", 1)) return(NULL); |
From: <sp...@us...> - 2011-09-19 01:46:47
|
changeset: 343:2f457756a387 user: sp...@us... date: Sun Sep 18 18:33:24 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/2f457756a387 description: fix missing configure check for Python.h (bug #3092663) - thanks to Zoltan Kovacs for reporting this problem! diffstat: ChangeLog | 2 ++ configure.ac | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletions(-) diffs (31 lines): diff -r 9a6dc24f222c -r 2f457756a387 ChangeLog --- a/ChangeLog Sun Sep 18 16:59:52 2011 -0700 +++ b/ChangeLog Sun Sep 18 18:33:24 2011 -0700 @@ -1,4 +1,6 @@ current: + * fix missing configure check for Python.h (bug #3092663) + - thanks to Zoltan Kovacs for reporting this problem! * fix C++ wrapper missing Symbol.quality (bug #3076524) - thanks to Rudy Melli for pointing this out! * fix C++ wrapper bugs (bug #3396068) diff -r 9a6dc24f222c -r 2f457756a387 configure.ac --- a/configure.ac Sun Sep 18 16:59:52 2011 -0700 +++ b/configure.ac Sun Sep 18 18:33:24 2011 -0700 @@ -436,7 +436,16 @@ [test -x "$PYTHON-config"], [PYTHON_CFLAGS=`$PYTHON-config --cflags`], [PYTHON_CFLAGS=`$PYTHON -c 'import distutils.sysconfig as s; print " ".join(s.get_config_vars("CFLAGS")) + " -I"+s.get_python_inc() + " -I"+s.get_python_inc(plat_specific=True)'`]) -dnl FIXME now should check that #include <Python.h> compiles + +dnl check that #include <Python.h> compiles (bug #3092663) + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" + AC_CHECK_HEADER([Python.h], [], [AC_MSG_ERROR([dnl +Python module enabled, but unable to compile Python.h. +Install the development package for python-$am_cv_python_version, or configure +--without-python to disable the python bindings.dnl +])]) + CPPFLAGS="$CPPFLAGS_save" AS_IF([test "x$with_gtk" = "xyes"], [PKG_CHECK_MODULES([PYGTK], [pygtk-2.0]) |
From: <sp...@us...> - 2011-09-19 01:46:47
|
changeset: 342:9a6dc24f222c user: sp...@us... date: Sun Sep 18 16:59:52 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/9a6dc24f222c description: fix C example libpng usage - thanks to nickmeinhold for finding and reporting the fix! diffstat: examples/scan_image.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diffs (33 lines): diff -r c85723b21066 -r 9a6dc24f222c examples/scan_image.c --- a/examples/scan_image.c Sun Sep 18 11:52:51 2011 -0700 +++ b/examples/scan_image.c Sun Sep 18 16:59:52 2011 -0700 @@ -3,6 +3,20 @@ #include <png.h> #include <zbar.h> +#if !defined(PNG_LIBPNG_VER) || \ + PNG_LIBPNG_VER < 10018 || \ + (PNG_LIBPNG_VER > 10200 && \ + PNG_LIBPNG_VER < 10209) + /* Changes to Libpng from version 1.2.42 to 1.4.0 (January 4, 2010) + * ... + * 2. m. The function png_set_gray_1_2_4_to_8() was removed. It has been + * deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with + * png_set_expand_gray_1_2_4_to_8() because the former function also + * expanded palette images. + */ +# define png_set_expand_gray_1_2_4_to_8 png_set_gray_1_2_4_to_8 +#endif + zbar_image_scanner_t *scanner = NULL; /* to complete a runnable example, this abbreviated implementation of @@ -30,7 +44,7 @@ if(color & PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png); if(color == PNG_COLOR_TYPE_GRAY && bits < 8) - png_set_gray_1_2_4_to_8(png); + png_set_expand_gray_1_2_4_to_8(png); if(bits == 16) png_set_strip_16(png); if(color & PNG_COLOR_MASK_ALPHA) |
From: <sp...@us...> - 2011-09-19 01:46:46
|
changeset: 341:c85723b21066 user: sp...@us... date: Sun Sep 18 11:52:51 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/c85723b21066 description: fix C++ wrapper missing Symbol.quality (bug #3076524) - thanks to Rudy Melli for pointing this out! diffstat: ChangeLog | 2 ++ include/zbar/Image.h | 1 + include/zbar/Symbol.h | 10 +++++++++- test/test_cpp_img.cpp | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diffs (59 lines): diff -r 7dfcfb9f5e6b -r c85723b21066 ChangeLog --- a/ChangeLog Sun Sep 18 11:38:54 2011 -0700 +++ b/ChangeLog Sun Sep 18 11:52:51 2011 -0700 @@ -1,4 +1,6 @@ current: + * fix C++ wrapper missing Symbol.quality (bug #3076524) + - thanks to Rudy Melli for pointing this out! * fix C++ wrapper bugs (bug #3396068) - thanks to anotheruser1 for reporting this! - add new C++ wrapper test diff -r 7dfcfb9f5e6b -r c85723b21066 include/zbar/Image.h --- a/include/zbar/Image.h Sun Sep 18 11:38:54 2011 -0700 +++ b/include/zbar/Image.h Sun Sep 18 11:52:51 2011 -0700 @@ -257,6 +257,7 @@ /// image format conversion. /// see zbar_image_convert() + /// @since 0.11 Image convert (std::string format) const { unsigned long fourcc = zbar_fourcc_parse(format.c_str()); diff -r 7dfcfb9f5e6b -r c85723b21066 include/zbar/Symbol.h --- a/include/zbar/Symbol.h Sun Sep 18 11:38:54 2011 -0700 +++ b/include/zbar/Symbol.h Sun Sep 18 11:52:51 2011 -0700 @@ -341,12 +341,20 @@ /// retrieve inter-frame coherency count. /// see zbar_symbol_get_count() - /// @since 1.5 + /// @since 0.5 int get_count () const { return((_sym) ? zbar_symbol_get_count(_sym) : -1); } + /// retrieve loosely defined relative quality metric. + /// see zbar_symbol_get_quality() + /// @since 0.11 + int get_quality () const + { + return((_sym) ? zbar_symbol_get_quality(_sym) : 0); + } + SymbolSet get_components () const { return(SymbolSet((_sym) ? zbar_symbol_get_components(_sym) : NULL)); diff -r 7dfcfb9f5e6b -r c85723b21066 test/test_cpp_img.cpp --- a/test/test_cpp_img.cpp Sun Sep 18 11:38:54 2011 -0700 +++ b/test/test_cpp_img.cpp Sun Sep 18 11:52:51 2011 -0700 @@ -84,7 +84,8 @@ expect_type && type == expect_type && data == expect_data && - sym.get_data_length() == expect_data.length(); + sym.get_data_length() == expect_data.length() && + sym.get_quality() > 4; if(pass) pass = !check_loc(img, sym); |
From: <sp...@us...> - 2011-09-18 18:39:34
|
changeset: 340:7dfcfb9f5e6b user: sp...@us... date: Sun Sep 18 11:38:54 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/7dfcfb9f5e6b description: fix C++ wrapper bugs (bug #3396068) - thanks to anotheruser1 for reporting this! - add new C++ wrapper test diffstat: ChangeLog | 3 + include/zbar/Image.h | 13 ++- include/zbar/Symbol.h | 17 ++- test/Makefile.am.inc | 9 +- test/test_cpp_img.cpp | 234 ++++++++++++++++++++++++++++++++++++++++++++++++++ test/test_images.c | 205 ++++++++++++++++++++++++++++++++++-------- test/test_images.h | 15 +++ 7 files changed, 444 insertions(+), 52 deletions(-) diffs (truncated from 671 to 300 lines): diff -r a111d70d612d -r 7dfcfb9f5e6b ChangeLog --- a/ChangeLog Tue Aug 23 12:17:23 2011 -0700 +++ b/ChangeLog Sun Sep 18 11:38:54 2011 -0700 @@ -1,4 +1,7 @@ current: + * fix C++ wrapper bugs (bug #3396068) + - thanks to anotheruser1 for reporting this! + - add new C++ wrapper test * fix avoid compositing ISBN10 data * add support for GraphicsMagick as ImageMagick alternative * mention xmlto in HACKING (patch #3297039) diff -r a111d70d612d -r 7dfcfb9f5e6b include/zbar/Image.h --- a/include/zbar/Image.h Tue Aug 23 12:17:23 2011 -0700 +++ b/include/zbar/Image.h Sun Sep 18 11:38:54 2011 -0700 @@ -115,8 +115,8 @@ ~Image () { - set_data(NULL, 0); - zbar_image_set_userdata(_img, NULL); + if(zbar_image_get_userdata(_img) == this) + zbar_image_set_userdata(_img, NULL); zbar_image_ref(_img, -1); } @@ -255,6 +255,14 @@ throw FormatError(); } + /// image format conversion. + /// see zbar_image_convert() + Image convert (std::string format) const + { + unsigned long fourcc = zbar_fourcc_parse(format.c_str()); + return(convert(fourcc)); + } + /// image format conversion with crop/pad. /// see zbar_image_convert_resize() /// @since 0.4 @@ -309,7 +317,6 @@ { // by default nothing is cleaned assert(img); - assert(zbar_image_get_userdata(img)); } private: diff -r a111d70d612d -r 7dfcfb9f5e6b include/zbar/Symbol.h --- a/include/zbar/Symbol.h Tue Aug 23 12:17:23 2011 -0700 +++ b/include/zbar/Symbol.h Sun Sep 18 11:38:54 2011 -0700 @@ -151,7 +151,8 @@ : _sym(sym), _index(index) { - sym->ref(1); + if(sym) + sym->ref(1); if(!sym || (unsigned)_index >= zbar_symbol_get_loc_size(*_sym)) _index = -1; @@ -162,20 +163,24 @@ : _sym(iter._sym), _index(iter._index) { - _sym->ref(); + if(_sym) + _sym->ref(); } /// destructor. ~PointIterator () { - _sym->ref(-1); + if(_sym) + _sym->ref(-1); } /// assignment. PointIterator& operator= (const PointIterator& iter) { - iter._sym->ref(); - _sym->ref(-1); + if(iter._sym) + iter._sym->ref(); + if(_sym) + _sym->ref(-1); _sym = iter._sym; _index = iter._index; return(*this); @@ -191,7 +196,7 @@ PointIterator& operator++ () { unsigned int i = ++_index; - if(i >= zbar_symbol_get_loc_size(*_sym)) + if(!_sym || i >= zbar_symbol_get_loc_size(*_sym)) _index = -1; return(*this); } diff -r a111d70d612d -r 7dfcfb9f5e6b test/Makefile.am.inc --- a/test/Makefile.am.inc Tue Aug 23 12:17:23 2011 -0700 +++ b/test/Makefile.am.inc Sun Sep 18 11:38:54 2011 -0700 @@ -28,6 +28,10 @@ test_test_cpp_SOURCES = test/test_cpp.cpp test_test_cpp_LDADD = zbar/libzbar.la $(AM_LDADD) +check_PROGRAMS += test/test_cpp_img +test_test_cpp_img_SOURCES = test/test_cpp_img.cpp $(TEST_IMAGE_SOURCES) +test_test_cpp_img_LDADD = zbar/libzbar.la $(AM_LDADD) + if HAVE_JPEG check_PROGRAMS += test/test_jpeg test_test_jpeg_SOURCES = test/test_jpeg.c @@ -68,13 +72,16 @@ test/.libs/test_convert test/.libs/test_window \ test/.libs/test_video test/.libs/dbg_scan test/.libs/test_gtk +check-cpp: test/test_cpp_img + test/test_cpp_img + check-decoder: test/test_decode test/test_decode -q regress-decoder: test/test_decode test/test_decode -n 100000 -check-local: check-decoder check-images +check-local: check-cpp check-decoder check-images regress: regress-decoder regress-images .PHONY: check-decoder check-images regress-decoder regress-images regress diff -r a111d70d612d -r 7dfcfb9f5e6b test/test_cpp_img.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/test_cpp_img.cpp Sun Sep 18 11:38:54 2011 -0700 @@ -0,0 +1,234 @@ +//------------------------------------------------------------------------ +// Copyright 2007-2009 (c) Jeff Brown <sp...@us...> +// +// This file is part of the ZBar Bar Code Reader. +// +// The ZBar Bar Code Reader is free software; you can redistribute it +// and/or modify it under the terms of the GNU Lesser Public License as +// published by the Free Software Foundation; either version 2.1 of +// the License, or (at your option) any later version. +// +// The ZBar Bar Code Reader is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser Public License for more details. +// +// You should have received a copy of the GNU Lesser Public License +// along with the ZBar Bar Code Reader; if not, write to the Free +// Software Foundation, Inc., 51 Franklin St, Fifth Floor, +// Boston, MA 02110-1301 USA +// +// http://sourceforge.net/projects/zbar +//------------------------------------------------------------------------ + +// NB do not put anything before this header +// it's here to check that we didn't omit any dependencies +#include <zbar.h> + +#include <iostream> +#include <sstream> +#include <iomanip> +#include "test_images.h" + +bool debug = false; +bool verbose = false; +int errors = 0; +zbar::zbar_symbol_type_t expect_type = zbar::ZBAR_NONE; +std::string expect_data; + +template <class T> +inline std::string to_string (const T& t) +{ + std::stringstream ss; + ss << t; + return ss.str(); +} + +static inline int +error (const std::string &msg) +{ + errors++; + std::cerr << "ERROR: " << msg << std::endl; + if(debug) + abort(); + return(-1); +} + +static inline int +check_loc (const zbar::Image &img, + const zbar::Symbol &sym) +{ + int n = 0; + int w = img.get_width(); + int h = img.get_height(); + for(zbar::Symbol::PointIterator p(sym.point_begin()); + p != sym.point_end(); + ++p, n++) + { + zbar::Symbol::Point q(*p); + if(q.x < 0 || q.x >= w || + q.y < 0 || q.y >= h) + error("location point out of range"); + } + return(!n); +} + +static inline int +check_symbol (const zbar::Image &img, + const zbar::Symbol &sym) +{ + zbar::zbar_symbol_type_t type(sym.get_type()); + std::string data(sym.get_data()); + + bool pass = + expect_type && + type == expect_type && + data == expect_data && + sym.get_data_length() == expect_data.length(); + if(pass) + pass = !check_loc(img, sym); + + if(verbose || !pass) + std::cerr << "decode Symbol: " << sym << std::endl; + + if(!expect_type) + error("unexpected"); + else if(!pass) + error(std::string("expected: ") + + zbar::zbar_get_symbol_name(expect_type) + + " " + expect_data); + + expect_type = zbar::ZBAR_NONE; + expect_data = ""; + return(!pass); +} + +static inline int +check_image (const zbar::Image &img) +{ + zbar::SymbolSet syms(img.get_symbols()); + int setn = syms.get_size(), countn = 0; + + int rc = 0; + for(zbar::SymbolIterator sym(syms.symbol_begin()); + sym != syms.symbol_end(); + ++sym, ++countn) + rc |= check_symbol(img, *sym); + + if(countn != setn) + rc |= error("SymbolSet size mismatch: exp=" + to_string(setn) + + " act=" + to_string(countn)); + return(rc); +} + +static inline void +expect (zbar::zbar_symbol_type_t type, + std::string data) +{ + if(expect_type) + error(std::string("missing: ") + zbar_get_symbol_name(expect_type) + + " " + expect_data); + expect_type = type; + expect_data = data; +} + +class Handler : public zbar::Image::Handler { + void image_callback(zbar::Image &img); +}; + +void +Handler::image_callback (zbar::Image &img) +{ + bool unexpected = !expect_type; + if(unexpected) + error("unexpected image callback"); + check_image(img); +} + +static inline int +test_processor () +{ + // create processor w/no video and no window + zbar::Processor proc(debug, NULL); + Handler handler; + proc.set_handler(handler); + if(debug) { + proc.set_visible(); + proc.user_wait(); + } + + // generate barcode test image + zbar::Image rgb3(0, 0, "RGB3"); + + // test cast to C image + if(test_image_ean13(rgb3)) + error("failed to generate image"); |
From: <sp...@us...> - 2011-08-23 19:18:13
|
changeset: 339:a111d70d612d user: sp...@us... date: Tue Aug 23 12:17:23 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/a111d70d612d description: Added tag iPhoneSDK-1.2.2 for changeset 146b857ff41a diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 146b857ff41a -r a111d70d612d .hgtags --- a/.hgtags Mon Aug 22 16:10:39 2011 -0700 +++ b/.hgtags Tue Aug 23 12:17:23 2011 -0700 @@ -24,3 +24,4 @@ 4bbb4e2bdba8c41a282df7e65a02797250f44daa iPhoneSDK-1.1.3 1ad84c3c03252c366a82552fa952674ec593c73f iPhoneSDK-1.2 9e7bad13ae6a4b65e0f0964512f96284d37f0dc8 iPhoneSDK-1.2.1 +146b857ff41ae462cc52f8dddf46d867763433a1 iPhoneSDK-1.2.2 |
From: <sp...@us...> - 2011-08-23 19:18:12
|
changeset: 338:146b857ff41a user: sp...@us... date: Mon Aug 22 16:10:39 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/146b857ff41a description: iPhone: reduce controller present and dismiss latency - add simple shutter to mask video start diffstat: iphone/ChangeLog | 4 ++ iphone/ZBarReaderViewController.m | 41 +++++++++++++++++++++- iphone/ZBarReaderViewImpl_Capture.m | 20 +++++++++- iphone/ZBarReaderViewImpl_Simulator.m | 24 +++++++++++++ iphone/include/ZBarSDK/ZBarReaderView.h | 5 ++ iphone/include/ZBarSDK/ZBarReaderViewController.h | 2 +- iphone/res/ZBarSDK-Info.plist | 2 +- 7 files changed, 90 insertions(+), 8 deletions(-) diffs (233 lines): diff -r 8b13d32233f5 -r 146b857ff41a iphone/ChangeLog --- a/iphone/ChangeLog Sat Aug 20 19:59:51 2011 -0700 +++ b/iphone/ChangeLog Mon Aug 22 16:10:39 2011 -0700 @@ -1,3 +1,7 @@ +version 1.2.2: + * reduce controller present and dismiss latency + - add simple shutter to mask video start + version 1.2.1: * fix overlay resizing bug diff -r 8b13d32233f5 -r 146b857ff41a iphone/ZBarReaderViewController.m --- a/iphone/ZBarReaderViewController.m Sat Aug 20 19:59:51 2011 -0700 +++ b/iphone/ZBarReaderViewController.m Mon Aug 22 16:10:39 2011 -0700 @@ -217,6 +217,8 @@ readerView = nil; [controls release]; controls = nil; + [shutter release]; + shutter = nil; } - (void) dealloc @@ -355,6 +357,15 @@ readerView.enableCache = enableCache; [view addSubview: readerView]; + shutter = [[UIView alloc] + initWithFrame: r]; + shutter.backgroundColor = [UIColor blackColor]; + shutter.opaque = NO; + shutter.autoresizingMask = + UIViewAutoresizingFlexibleWidth | + UIViewAutoresizingFlexibleHeight; + [view addSubview: shutter]; + if(cameraOverlayView) { assert(!cameraOverlayView.superview); [cameraOverlayView removeFromSuperview]; @@ -386,7 +397,11 @@ [readerView willRotateToInterfaceOrientation: self.interfaceOrientation duration: 0]; - [readerView start]; + [readerView performSelector: @selector(start) + withObject: nil + afterDelay: .001]; + shutter.alpha = 1; + shutter.hidden = NO; UIApplication *app = [UIApplication sharedApplication]; BOOL willHideStatusBar = @@ -410,7 +425,7 @@ - (void) viewWillDisappear: (BOOL) animated { - [readerView stop]; + readerView.captureReader.enableReader = NO; if(didHideStatusBar) { [[UIApplication sharedApplication] @@ -422,6 +437,13 @@ [super viewWillDisappear: animated]; } +- (void) viewDidDisappear: (BOOL) animated +{ + // stopRunning can take a really long time (>1s observed), + // so defer until the view transitions are complete + [readerView stop]; +} + - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orient { return((supportedOrientationsMask >> orient) & 1); @@ -620,7 +642,7 @@ // ZBarReaderViewDelegate -- (void) readerView: (ZBarReaderView*) view +- (void) readerView: (ZBarReaderView*) readerView didReadSymbols: (ZBarSymbolSet*) syms fromImage: (UIImage*) image { @@ -633,6 +655,19 @@ nil]]; } +- (void) readerViewDidStart: (ZBarReaderView*) readerView +{ + if(!shutter.hidden) + [UIView animateWithDuration: .25 + animations: ^{ + shutter.alpha = 0; + } + completion: ^(BOOL finished) { + shutter.hidden = YES; + }]; +} + + // "deprecated" properties #define DEPRECATED_PROPERTY(getter, setter, type, val, ignore) \ diff -r 8b13d32233f5 -r 146b857ff41a iphone/ZBarReaderViewImpl_Capture.m --- a/iphone/ZBarReaderViewImpl_Capture.m Sat Aug 20 19:59:51 2011 -0700 +++ b/iphone/ZBarReaderViewImpl_Capture.m Mon Aug 22 16:10:39 2011 -0700 @@ -267,6 +267,9 @@ } else zlog(@"failed to lock device: %@", error); + + if([readerDelegate respondsToSelector: @selector(readerViewDidStart:)]) + [readerDelegate readerViewDidStart: self]; } - (void) onVideoStop: (NSNotification*) note @@ -277,6 +280,11 @@ [device unlockForConfiguration]; running = NO; + + if([readerDelegate respondsToSelector: + @selector(readerView:didStopWithError:)]) + [readerDelegate readerView: self + didStopWithError: nil]; } - (void) onVideoError: (NSNotification*) note @@ -289,9 +297,15 @@ } NSError *err = [note.userInfo objectForKey: AVCaptureSessionErrorKey]; - NSLog(@"ZBarReaderView: ERROR during capture: %@: %@", - [err localizedDescription], - [err localizedFailureReason]); + + if([readerDelegate respondsToSelector: + @selector(readerView:didStopWithError:)]) + [readerDelegate readerView: self + didStopWithError: err]; + else + NSLog(@"ZBarReaderView: ERROR during capture: %@: %@", + [err localizedDescription], + [err localizedFailureReason]); } // NSKeyValueObserving diff -r 8b13d32233f5 -r 146b857ff41a iphone/ZBarReaderViewImpl_Simulator.m --- a/iphone/ZBarReaderViewImpl_Simulator.m Sat Aug 20 19:59:51 2011 -0700 +++ b/iphone/ZBarReaderViewImpl_Simulator.m Mon Aug 22 16:10:39 2011 -0700 @@ -125,6 +125,10 @@ return; [super start]; running = YES; + + [self performSelector: @selector(onVideoStart) + withObject: nil + afterDelay: 0.5]; } - (void) stop @@ -133,6 +137,10 @@ return; [super stop]; running = NO; + + [self performSelector: @selector(onVideoStop) + withObject: nil + afterDelay: 0.5]; } - (void) scanImage: (UIImage*) image @@ -192,4 +200,20 @@ scanImage = nil; } +- (void) onVideoStart +{ + if(running && + [readerDelegate respondsToSelector: @selector(readerViewDidStart:)]) + [readerDelegate readerViewDidStart: self]; +} + +- (void) onVideoStop +{ + if(!running && + [readerDelegate respondsToSelector: + @selector(readerView:didStopWithError:)]) + [readerDelegate readerView: self + didStopWithError: nil]; +} + @end diff -r 8b13d32233f5 -r 146b857ff41a iphone/include/ZBarSDK/ZBarReaderView.h --- a/iphone/include/ZBarSDK/ZBarReaderView.h Sat Aug 20 19:59:51 2011 -0700 +++ b/iphone/include/ZBarSDK/ZBarReaderView.h Mon Aug 22 16:10:39 2011 -0700 @@ -36,6 +36,11 @@ didReadSymbols: (ZBarSymbolSet*) symbols fromImage: (UIImage*) image; +@optional +- (void) readerViewDidStart: (ZBarReaderView*) readerView; +- (void) readerView: (ZBarReaderView*) readerView + didStopWithError: (NSError*) error; + @end // read barcodes from the displayed video preview. the view maintains diff -r 8b13d32233f5 -r 146b857ff41a iphone/include/ZBarSDK/ZBarReaderViewController.h --- a/iphone/include/ZBarSDK/ZBarReaderViewController.h Sat Aug 20 19:59:51 2011 -0700 +++ b/iphone/include/ZBarSDK/ZBarReaderViewController.h Mon Aug 22 16:10:39 2011 -0700 @@ -56,7 +56,7 @@ BOOL showsZBarControls, tracksSymbols, enableCache; ZBarHelpController *helpController; - UIView *controls; + UIView *controls, *shutter; BOOL didHideStatusBar, rotating; ZBarCameraSimulator *cameraSim; } diff -r 8b13d32233f5 -r 146b857ff41a iphone/res/ZBarSDK-Info.plist --- a/iphone/res/ZBarSDK-Info.plist Sat Aug 20 19:59:51 2011 -0700 +++ b/iphone/res/ZBarSDK-Info.plist Mon Aug 22 16:10:39 2011 -0700 @@ -7,7 +7,7 @@ <key>CFBundleName</key> <string>ZBarSDK</string> <key>CFBundleVersion</key> - <string>1.2.1</string> + <string>1.2.2</string> <key>CFBundleSignature</key> <string>????</string> <key>NSHumanReadableCopyright</key> |
From: <sp...@us...> - 2011-08-21 03:02:05
|
changeset: 337:8b13d32233f5 user: sp...@us... date: Sat Aug 20 19:59:51 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/8b13d32233f5 description: Added tag iPhoneSDK-1.2.1 for changeset 9e7bad13ae6a diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 9e7bad13ae6a -r 8b13d32233f5 .hgtags --- a/.hgtags Sat Aug 20 19:22:34 2011 -0700 +++ b/.hgtags Sat Aug 20 19:59:51 2011 -0700 @@ -23,3 +23,4 @@ 801318a6195060c31259da1f076ecc9a609616cc iPhoneSDK-1.1.2 4bbb4e2bdba8c41a282df7e65a02797250f44daa iPhoneSDK-1.1.3 1ad84c3c03252c366a82552fa952674ec593c73f iPhoneSDK-1.2 +9e7bad13ae6a4b65e0f0964512f96284d37f0dc8 iPhoneSDK-1.2.1 |
From: <sp...@us...> - 2011-08-21 03:02:04
|
changeset: 336:9e7bad13ae6a user: sp...@us... date: Sat Aug 20 19:22:34 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/9e7bad13ae6a description: iPhone: fix overlay resizing bug diffstat: iphone/ChangeLog | 3 +++ iphone/ZBarReaderViewController.m | 2 +- iphone/examples/readertest/readertest.m | 4 ++-- iphone/res/ZBarSDK-Info.plist | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diffs (62 lines): diff -r efd3baa07419 -r 9e7bad13ae6a iphone/ChangeLog --- a/iphone/ChangeLog Mon Aug 08 13:28:16 2011 -0700 +++ b/iphone/ChangeLog Sat Aug 20 19:22:34 2011 -0700 @@ -1,3 +1,6 @@ +version 1.2.1: + * fix overlay resizing bug + version 1.2: * release updates diff -r efd3baa07419 -r 9e7bad13ae6a iphone/ZBarReaderViewController.m --- a/iphone/ZBarReaderViewController.m Mon Aug 08 13:28:16 2011 -0700 +++ b/iphone/ZBarReaderViewController.m Sat Aug 20 19:22:34 2011 -0700 @@ -208,6 +208,7 @@ - (void) cleanup { + [cameraOverlayView removeFromSuperview]; cameraSim.readerView = nil; [cameraSim release]; cameraSim = nil; @@ -357,7 +358,6 @@ if(cameraOverlayView) { assert(!cameraOverlayView.superview); [cameraOverlayView removeFromSuperview]; - cameraOverlayView.frame = readerView.frame; [view addSubview: cameraOverlayView]; } diff -r efd3baa07419 -r 9e7bad13ae6a iphone/examples/readertest/readertest.m --- a/iphone/examples/readertest/readertest.m Mon Aug 08 13:28:16 2011 -0700 +++ b/iphone/examples/readertest/readertest.m Sat Aug 20 19:22:34 2011 -0700 @@ -572,6 +572,8 @@ typeOvl.text = nil; dataOvl.text = nil; [self.tableView reloadData]; + if(reader.sourceType == UIImagePickerControllerSourceTypeCamera) + reader.cameraOverlayView = (reader.showsZBarControls) ? nil : overlay; if([reader respondsToSelector: @selector(readerView)]) { reader.readerView.showsFPS = YES; if(zoom) @@ -580,8 +582,6 @@ ? ZBarOrientationMaskAll : ZBarOrientationMask(UIInterfaceOrientationPortrait); // tmp disable } - if(reader.sourceType == UIImagePickerControllerSourceTypeCamera) - reader.cameraOverlayView = (reader.showsZBarControls) ? nil : overlay; manualBtn.enabled = TARGET_IPHONE_SIMULATOR || (reader.cameraMode == ZBarReaderControllerCameraModeDefault) || [reader isKindOfClass: [ZBarReaderViewController class]]; diff -r efd3baa07419 -r 9e7bad13ae6a iphone/res/ZBarSDK-Info.plist --- a/iphone/res/ZBarSDK-Info.plist Mon Aug 08 13:28:16 2011 -0700 +++ b/iphone/res/ZBarSDK-Info.plist Sat Aug 20 19:22:34 2011 -0700 @@ -7,7 +7,7 @@ <key>CFBundleName</key> <string>ZBarSDK</string> <key>CFBundleVersion</key> - <string>1.2</string> + <string>1.2.1</string> <key>CFBundleSignature</key> <string>????</string> <key>NSHumanReadableCopyright</key> |
From: <sp...@us...> - 2011-08-08 20:29:14
|
changeset: 335:efd3baa07419 user: sp...@us... date: Mon Aug 08 13:28:16 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/efd3baa07419 description: merge iPhone release diffstat: .hgtags | 1 + iphone/ChangeLog | 3 +++ iphone/res/ZBarSDK-Info.plist | 2 +- 3 files changed, 5 insertions(+), 1 deletions(-) diffs (30 lines): diff -r 2feec8aa3134 -r efd3baa07419 .hgtags --- a/.hgtags Mon Aug 08 10:15:29 2011 -0700 +++ b/.hgtags Mon Aug 08 13:28:16 2011 -0700 @@ -22,3 +22,4 @@ f9e46865dbcebd04683ca7592ab32aeda615e772 iPhoneSDK-1.1.1 801318a6195060c31259da1f076ecc9a609616cc iPhoneSDK-1.1.2 4bbb4e2bdba8c41a282df7e65a02797250f44daa iPhoneSDK-1.1.3 +1ad84c3c03252c366a82552fa952674ec593c73f iPhoneSDK-1.2 diff -r 2feec8aa3134 -r efd3baa07419 iphone/ChangeLog --- a/iphone/ChangeLog Mon Aug 08 10:15:29 2011 -0700 +++ b/iphone/ChangeLog Mon Aug 08 13:28:16 2011 -0700 @@ -1,3 +1,6 @@ +version 1.2: + * release updates + version 1.1.3: * fix UITabViewController rotation interaction diff -r 2feec8aa3134 -r efd3baa07419 iphone/res/ZBarSDK-Info.plist --- a/iphone/res/ZBarSDK-Info.plist Mon Aug 08 10:15:29 2011 -0700 +++ b/iphone/res/ZBarSDK-Info.plist Mon Aug 08 13:28:16 2011 -0700 @@ -7,7 +7,7 @@ <key>CFBundleName</key> <string>ZBarSDK</string> <key>CFBundleVersion</key> - <string>1.1.3</string> + <string>1.2</string> <key>CFBundleSignature</key> <string>????</string> <key>NSHumanReadableCopyright</key> |
From: <sp...@us...> - 2011-08-08 20:29:14
|
changeset: 334:1964056103bf user: sp...@us... date: Mon Aug 08 13:27:03 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/1964056103bf description: Added tag iPhoneSDK-1.2 for changeset 1ad84c3c0325 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 1ad84c3c0325 -r 1964056103bf .hgtags --- a/.hgtags Mon Aug 08 13:25:23 2011 -0700 +++ b/.hgtags Mon Aug 08 13:27:03 2011 -0700 @@ -22,3 +22,4 @@ f9e46865dbcebd04683ca7592ab32aeda615e772 iPhoneSDK-1.1.1 801318a6195060c31259da1f076ecc9a609616cc iPhoneSDK-1.1.2 4bbb4e2bdba8c41a282df7e65a02797250f44daa iPhoneSDK-1.1.3 +1ad84c3c03252c366a82552fa952674ec593c73f iPhoneSDK-1.2 |
From: <sp...@us...> - 2011-08-08 20:29:14
|
changeset: 333:1ad84c3c0325 user: sp...@us... date: Mon Aug 08 13:25:23 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/1ad84c3c0325 description: iPhone: release updates diffstat: iphone/ChangeLog | 3 +++ iphone/res/ZBarSDK-Info.plist | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diffs (22 lines): diff -r 0f58a088ed63 -r 1ad84c3c0325 iphone/ChangeLog --- a/iphone/ChangeLog Thu Jul 28 20:16:50 2011 -0700 +++ b/iphone/ChangeLog Mon Aug 08 13:25:23 2011 -0700 @@ -1,3 +1,6 @@ +version 1.2: + * release updates + version 1.1.3: * fix UITabViewController rotation interaction diff -r 0f58a088ed63 -r 1ad84c3c0325 iphone/res/ZBarSDK-Info.plist --- a/iphone/res/ZBarSDK-Info.plist Thu Jul 28 20:16:50 2011 -0700 +++ b/iphone/res/ZBarSDK-Info.plist Mon Aug 08 13:25:23 2011 -0700 @@ -7,7 +7,7 @@ <key>CFBundleName</key> <string>ZBarSDK</string> <key>CFBundleVersion</key> - <string>1.1.3</string> + <string>1.2</string> <key>CFBundleSignature</key> <string>????</string> <key>NSHumanReadableCopyright</key> |