Skip to content

Commit

Permalink
iOS: Lion and Xcode updates
Browse files Browse the repository at this point in the history
  - fix new warnings/errors
  - find missing buddy
  - fix SDK bg image: force resoution to 72dpi
  • Loading branch information
spadix0 committed Oct 13, 2012
1 parent 9c18e21 commit 4aa6bcb
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion iphone/ZBarReaderView.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ + (id) alloc
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]);
}
Expand Down
9 changes: 7 additions & 2 deletions iphone/ZBarReaderViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
return(AVCaptureTorchModeAuto);
case UIImagePickerControllerCameraFlashModeOn:
return(AVCaptureTorchModeOn);
//case UIImagePickerControllerCameraFlashModeOff:
case UIImagePickerControllerCameraFlashModeOff:
break;
}
return(AVCaptureTorchModeOff);
}
Expand All @@ -101,6 +102,10 @@
return(AVCaptureSessionPresetMedium);
case UIImagePickerControllerQualityTypeLow:
return(AVCaptureSessionPresetLow);
case UIImagePickerControllerQualityTypeIFrame1280x720:
return(AVCaptureSessionPresetiFrame1280x720);
case UIImagePickerControllerQualityTypeIFrame960x540:
return(AVCaptureSessionPresetiFrame960x540);
}
#endif
return(nil);
Expand Down Expand Up @@ -184,7 +189,7 @@ - (id) init
// fallback to old interface
zlog(@"Falling back to ZBarReaderController");
[self release];
return([ZBarReaderController new]);
return((id)[ZBarReaderController new]);
}

self = [super init];
Expand Down
7 changes: 5 additions & 2 deletions iphone/bin/CreateDMG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ set -ux
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
Expand Down
12 changes: 6 additions & 6 deletions iphone/doc/ZBarImage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Properties
.. 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

Expand All @@ -47,12 +47,12 @@ Properties
.. 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

Expand All @@ -67,7 +67,7 @@ Properties
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
Expand Down Expand Up @@ -102,7 +102,7 @@ Instance Methods

: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
Expand All @@ -114,7 +114,7 @@ Instance Methods
: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
Expand Down
2 changes: 1 addition & 1 deletion iphone/doc/camera.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ you are familiar with that. Basically you:
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
Expand Down
2 changes: 1 addition & 1 deletion iphone/doc/picker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ documentation for :class:`UIImagePickerController` for more detais.
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
Expand Down
Binary file modified iphone/res/ZBarSDK-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions zbar/img_scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,10 @@ int zbar_scan_image (zbar_image_scanner_t *iscn,
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) {
Expand Down

0 comments on commit 4aa6bcb

Please sign in to comment.