ZXingObjC
=========
ZXingObjC is a full Objective-C port of [ZXing](https://github.com/zxing/zxing) ("Zebra Crossing"), a Java barcode image processing library. It is designed to be used on both iOS devices and in Mac applications.
The following barcodes are currently supported for both encoding and decoding:
* UPC-A and UPC-E
* EAN-8 and EAN-13
* Code 39
* Code 93
* Code 128
* ITF
* Codabar
* RSS-14 (all variants)
* QR Code
* Data Matrix
* Aztec ('beta' quality)
* PDF 417 ('alpha' quality)
ZXingObjC currently has feature parity with ZXing version 3.0.
## Requirements
ZXingObjC requires Xcode 5, targeting either iOS 6.0 and above, or Mac OS X 10.8 Mountain Lion and above.
## Usage
Encoding:
```objc
NSError *error = nil;
ZXMultiFormatWriter *writer = [ZXMultiFormatWriter writer];
ZXBitMatrix* result = [writer encode:@"A string to encode"
format:kBarcodeFormatQRCode
width:500
height:500
error:&error];
if (result) {
CGImageRef image = [[ZXImage imageWithMatrix:result] cgimage];
// This CGImageRef image can be placed in a UIImage, NSImage, or written to a file.
} else {
NSString *errorMessage = [error localizedDescription];
}
```
Decoding:
```objc
CGImageRef imageToDecode; // Given a CGImage in which we are looking for barcodes
ZXLuminanceSource *source = [[[ZXCGImageLuminanceSource alloc] initWithCGImage:imageToDecode] autorelease];
ZXBinaryBitmap *bitmap = [ZXBinaryBitmap binaryBitmapWithBinarizer:[ZXHybridBinarizer binarizerWithSource:source]];
NSError *error = nil;
// There are a number of hints we can give to the reader, including
// possible formats, allowed lengths, and the string encoding.
ZXDecodeHints *hints = [ZXDecodeHints hints];
ZXMultiFormatReader *reader = [ZXMultiFormatReader reader];
ZXResult *result = [reader decode:bitmap
hints:hints
error:&error];
if (result) {
// The coded result as a string. The raw data can be accessed with
// result.rawBytes and result.length.
NSString *contents = result.text;
// The barcode format, such as a QR code or UPC-A
ZXBarcodeFormat format = result.barcodeFormat;
} else {
// Use error to determine why we didn't get a result, such as a barcode
// not being found, an invalid checksum, or a format inconsistency.
}
```
## Installation
The recommended way to install ZXingObjC is with [CocoaPods](http://cocoapods.org), a dependency mananger for Objective-C projects. After installing CocoaPods just add ZXingObjC to your Podfile:
```ruby
platform :ios, '7.0'
pod 'ZXingObjC', '~> 3.0'
```
## Examples
ZXingObjC includes several example applications found in "examples" folder:
* BarcodeScanner - An iOS application that captures video from the camera, scans for barcodes and displays results on screen.
* BarcodeScannerOSX - An OS X application that captures video from the camera, scans for barcodes and displays results on screen.
* QrCodeTest - A basic QR code generator that accepts input, encodes it as a QR code, and displays it on screen.
## License
ZXingObjC is available under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html).
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
软件开发设计:PHP、QT、应用软件开发、系统软件开发、移动应用开发、网站开发C++、Java、python、web、C#等语言的项目开发与学习资料 硬件与设备:单片机、EDA、proteus、RTOS、包括计算机硬件、服务器、网络设备、存储设备、移动设备等 操作系统:LInux、IOS、树莓派、安卓开发、微机操作系统、网络操作系统、分布式操作系统等。此外,还有嵌入式操作系统、智能操作系统等。 网络与通信:数据传输、信号处理、网络协议、网络与通信硬件、网络安全网络与通信是一个非常广泛的领域,它涉及到计算机科学、电子工程、数学等多个学科的知识。 云计算与大数据:数据集、包括云计算平台、大数据分析、人工智能、机器学习等,云计算是一种基于互联网的计算方式,通过这种方式,共享的软硬件资源和信息可以按需提供给计算机和其他设备。
资源推荐
资源详情
资源评论
收起资源包目录
QRCode Demo---仿微信二维码扫描,iOS原生API,需要iOS7.0及以上系统支持。.zip (1021个子文件)
COPYING 11KB
.DS_Store 6KB
ZXUPCEANReader.h 5KB
ZXBitMatrix.h 4KB
ZXQRCodeMatrixUtil.h 4KB
ZXGridSampler.h 4KB
ZXAddressBookParsedResult.h 4KB
ZXLuminanceSource.h 4KB
ZXQRCodeEncoder.h 4KB
ZXBitArray.h 4KB
ZXBinaryBitmap.h 3KB
ZXEncodeHints.h 3KB
ZXDataMatrixHighLevelEncoder.h 3KB
ZXBinarizer.h 3KB
ZXQRCodeVersion.h 3KB
ZXDecodeHints.h 3KB
ZXExpandedProductParsedResult.h 3KB
ZXResultMetadataType.h 3KB
ZXQRCodeFinderPatternFinder.h 3KB
ZXQRCodeDetector.h 3KB
ZXDataMatrixSymbolInfo.h 3KB
ZXingObjCOneD.h 3KB
ZXGenericGF.h 3KB
ZXResult.h 3KB
ZXDataMatrixVersion.h 2KB
ZXQRCodeBitMatrixParser.h 2KB
ZXReader.h 2KB
ZXResultParser.h 2KB
ZXQRCodeAlignmentPatternFinder.h 2KB
ZXCalendarParsedResult.h 2KB
ZXingObjCCore.h 2KB
ZXCapture.h 2KB
ZXGenericGFPoly.h 2KB
ZXQRCodeMode.h 2KB
ZXCode39Reader.h 2KB
ZXErrors.h 2KB
ZXQRCodeMaskUtil.h 2KB
ZXAztecState.h 2KB
ZXBitSource.h 2KB
ZXPDF417.h 2KB
ZXQRCodeDecoder.h 2KB
ZXWhiteRectangleDetector.h 2KB
ZXReedSolomonDecoder.h 2KB
ZXDecoderResult.h 2KB
ZXQRCodeDataMask.h 2KB
ZXCGImageLuminanceSource.h 2KB
ZXQRCodeDataBlock.h 2KB
ZXQRCodeFinderPattern.h 2KB
ZXPDF417ErrorCorrection.h 2KB
ZXPerspectiveTransform.h 2KB
ZXDataMatrixDecoder.h 2KB
ZXHybridBinarizer.h 2KB
ZXBarcodeFormat.h 2KB
ZXDataMatrixEncoderContext.h 2KB
ZXAbstractRSSReader.h 2KB
ZXDataMatrixDataBlock.h 2KB
ZXVINParsedResult.h 2KB
ZXPDF417BoundingBox.h 2KB
ZXWriter.h 2KB
ZXAztecHighLevelEncoder.h 2KB
ZXQRCodeErrorCorrectionLevel.h 2KB
ZXPlanarYUVLuminanceSource.h 2KB
ZXPDF417BarcodeRow.h 2KB
ZXAztecEncoder.h 2KB
ZXMonochromeRectangleDetector.h 2KB
ZXParsedResult.h 1KB
ZXEmailAddressParsedResult.h 1KB
ZXGlobalHistogramBinarizer.h 1KB
SYQRCodeViewController.h 1KB
ZXITFReader.h 1KB
ZXQRCodeAlignmentPattern.h 1KB
ZXMultiFormatReader.h 1KB
ZXWifiParsedResult.h 1KB
ZXQRCodeFormatInformation.h 1KB
ZXURIParsedResult.h 1KB
ZXDataMatrixDefaultPlacement.h 1KB
ZXGeoParsedResult.h 1KB
ZXPDF417Detector.h 1KB
ZXSMSParsedResult.h 1KB
ZXGenericMultipleBarcodeReader.h 1KB
ZXAztecDetector.h 1KB
ZXResultPoint.h 1KB
ZXCharacterSetECI.h 1KB
ZXPDF417HighLevelEncoder.h 1KB
ZXSMSMMSResultParser.h 1KB
ZXDataMatrixBitMatrixParser.h 1KB
ZXPDF417Common.h 1KB
ZXOneDReader.h 1KB
ZXMultiFinderPatternFinder.h 1KB
ZXQRCodeDecodedBitStreamParser.h 1KB
ZXPDF417BarcodeMatrix.h 1KB
ZXEmailDoCoMoResultParser.h 1KB
ZXPDF417DetectionResult.h 1KB
ZXCode128Reader.h 1KB
ZXModulusGF.h 1KB
ZXRSSExpandedPair.h 1KB
ZXModulusPoly.h 1KB
ZXPDF417ScanningDecoder.h 1KB
ZXAddressBookDoCoMoResultParser.h 1KB
ZXByQuadrantReader.h 1KB
共 1021 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11
资源评论
妄北y
- 粉丝: 1w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 筷手引流工具.apk
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功