# ZXing.Delphi
ZXing Barcode Scanning Library for Delphi XE to 11.2 Alexandria
<img align="right" src="https://github.com/Spelt/ZXing.Delphi/blob/v_3.0/zxing-logo.png"/>
![ZXing.Delphi Logo](https://github.com/Spelt/ZXing.Delphi/blob/v_3.0/zxing.Delphi.picture2.png )
ZXing.Delphi is a native Object Pascal library that is based on the well known open source Barcode Library: ZXing (Zebra Crossing). This port is based on .Net Redth port of ZXing and the Java one. This is I think the first native FireMonkey barcode lib. It is aimed at all of the FireMonkey mobile platforms and, starting from v3.1, it fully supports also Windows VCL applications (no dependencies on FMX.Graphics unit).
With this library you can scan with native speed without the use of linking in external libraries and avoid compatibility issues and dependencies. It is fast.
Its compatible with in Delphi XE7 - 11 Alexandria and tested with IOS 8.x - 15.x, Android 32/64, Windows 32/64 and OSX.
The goal of ZXing.Delphi is to make scanning barcodes effortless, painless, fast and build within your FireMonkey or native Windows (VCL or Firemonkey) applications.
Just include the source files and add it in your existing projects and build the ZXing.Delphi source within your projects.
## Camera
The standard camera component is, I think too slow for Android and IOS. You need to find a third party product or cook your own for a smooth experience.
## Supported Formats
| 1D product | 1D industrial | 2D
| ---------- | ------------- | --------------
| UPC-A | Code 39 | QR Code
| UPC-E | Code 93 | Data Matrix (Center images only)
| EAN-8 | Code 128 |
| EAN-13 | ITF |
### Features
- Native compiled barcode scanning for all VCL and FireMonkey platforms (IOS/Android/Windows/OSX).
- 100% free. No license fees. Just free.
- Speed
- Simple API
- Unit tests provided
- Test projects provided
### Changes
- v3.9.5
- fix: overflow Android. https://github.com/Spelt/ZXing.Delphi/issues/136
- v3.9.4
- fix: when using TBarcodeFormat.Auto certain QRCodes causes integer overflow in EAN parser. https://github.com/Spelt/ZXing.Delphi/issues/133
- v3.9.3
- Demo app is Alexandria/Android compatible (Thanks igorbastosib and Patrick Prémartin)
- fix: Some boundary check added (Thanks igorbastosib)
- fix: Segmentatition fault (Thanks Macc2010)
- v3.9.2
- Removal of advanced test app.
- fix: Access Violation in Decode https://github.com/Spelt/ZXing.Delphi/issues/100
- fix: ZXing.Common.BitMatrix Range Check Error - https://github.com/Spelt/ZXing.Delphi/issues/104
- v3.9.0
- QRCode 64bit Android and IOS fix (Issue #93 and #62)
- v3.8.3
- Some memleak fixes and simplified Advanced test app.
- v3.8.1
- In 'Advanced demo' added Rio compatible Android camera optimizing library (thanks to E. van Bilsen).
- v3.8
- Fixed missing files for 'advanced test demo app', due to incompatibility with the external used libFastUtils.a and libfastutils-android.a it is not supported for Rio and Android.
- Added in 'advanced test demo app' new Rio / Android 7+ code for the new permission model.
- v3.7
- Changes in demo app. Asking Permissions to mobile users.
- v3.6
- Fixed QRCode bug and QR Memleak (thanks to C. Pradelli)
- v3.5
- Fixed a QRCode bug. Did not find the QRCode in some cases. Bugfix: https://github.com/Spelt/ZXing.Delphi/issues/65
- v3.4
- Added an advanced test app. Featuring faster camera, sound, barcode marker,warning for slow camera and a cool HUD. It makes use of huge camera performance tweak. See Readme in the uMain.pas and https://quality.embarcadero.com/browse/RSP-10592
- Little cleanup
- v3.3.1 Date: 2017/01/08 (Thanks for Nano103)
- Bug fix in Code39
- v3.3 Date: 2016/12/10 (Thanks for Nano103 for adding Code 39)
- Added UPC-A, UPC-E, Code 39
- Now Delphi is listed at the official zxing page: https://github.com/zxing/zxing
- Added tip section.
- v3.2 Date: 2016/11/27
- Added EAN8, EAN13 (many requests)
- v3 becomes master branch
- v3.1 Date: 2016/06/28 (Super many thanks to: Carlo Sirna)
- Added VCL support (via IFDEF USE_VCL_BITMAP).
- Memleak fixes for old gen compilers (win32/win64).
- Fix: QRCode ECI character set + extra unit test.
- Added 'Load Image from file' command in test project.
- UTF-8 fixed bug + added unit test
- Some other bug fixes.
- v3.0 Date: 2016/04/28 (Great many thanks to: Kai Gossens and Raphael Büchler)
- Massive folder restructuring
- Added DataMatrix (centered only).
- ResultPoint event added.
- Support for inverted 1D/2D code types.
- Better OneDReader scan strategy
- Redesigned the file/folder structure for better namespacing.
- Simplification of adding readers to the TMultiformatReader (just add all your readers here)
- Small improvements.
- v2.4 Date: 2016/04/06
- Fix in Code128 where code did not scan at all sometimes.
- v2.3 Date: 2016/02/27
- Fixed leaks.
- Android added to compatibility list.
- v2.2 Date: 2016/02/21
- Fixed IOS crash bug on 32bit only (ITF related).
- v2.1 Date: 2016/01/29
- Implemented ITF (thanks p. b. Hofstede!) + unit test.
- Fixed small bug.
- v2.0 Date: 2015/11/30
- Implemented QR-Codes + unit test.
- v1.1 Date: 2015/7/11
- Implemented Code 93 + unit test.
- v1.0
- Init upload
- Base classes 1D barcode implemented.
- Implemented Code 128 + unit test.
### Tips - How to optimize an already fast library.
- Try not to scan every incoming frame.
- Use autoformat scanning with care, with automatic on every frame is passed to every barcode format. For example: If you want to scan only EAN-8, set the scan format for only EAN-8.
- For mobile: try not to scan every frame, skip every n frame. Scanning 4 frames in a second should be good for most purposes. Safes CPU and battery.
- For mobile: try setting your camera not to a high resolution. 640x480 is for most purposes perfect. More resolutions means more pixels to scan means slower. Saves CPU and battery.
### Other barcodes?
Although it works extremely well, we still miss a few barcodes.For me there is no immediate need yet for me to implement more types but I like to add all of them! For that I need your help!
The base classes are already implemented so if you need to have another Barcode like Code39 (already done :-) ) you can see the C# source here: https://github.com/Redth/ZXing.Net.Mobile/blob/master/src/ZXing.Net/oned/Code39Reader.cs and convert it to Pascal. It's pretty easy (or just ask and I convert the raw classes for you).
**If you want to help:** Let us/me know which barcode you planning to implement. There is no point in converting barcodes multiple times :-)
### 'What is different compared to the original source and what do I need to know if I implement a barcode?' How did you do it?
- I convert C# files to pascal via:
- Build it in .NET
- Decompile it with 'Reflector 6' (which has a Delphi decompile function) to Delphi.NET
- Copy and paste the files to the project.
- Convert the source from Delphi.Net
- I made use of generic array lists. This is easier and strongly typed.
- I stayed at the architecture and directory structure as implemented in the .Net source.
- There is a lot of bit shifting going around. Left bit shifting is the same as in C# but right bit shifing is not! I made a helper for this: TMathUtils.Asr
### Usage
The simplest example of using ZXing.Delphi looks something like this:
Include all the files in your project or use search path like included test application
- Add uses: ScanManager, ZXing.BarcodeFormat, ZXing.ReadResult.
- Add var FScanManager, FReadResult.
```Pascal
FScanManager := TScanManager.Create(TBarcodeFormat.CODE_128, nil);
FReadResult := FScanManager.Scan(scanBitmap);
```
Of course the real world is not that simple. To leave your app responsive while scanning you need to run things in parallel. I created a test app to show you how just to do that. Its included. It makes use of the new Firem
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
ZXing.Delphi是一个原生的对象Pascal库,它基于著名的开源条形码库:ZXing(Zebra Crossing)。这个端口是基于ZXing的.Net Redth port和Java的。这是我认为第一个原生的FireMonkey条形码库。它针对所有FireMonkey移动平台,从v3.1开始,它还完全支持Windows VCL应用程序(不依赖于FMX。图形单元)。 使用此库,您可以以本机速度进行扫描,而无需使用外部库中的链接,并避免兼容性问题和依赖关系。它很快。 它与Delphi XE7 - 11 Alexandria兼容,并与IOS 8.x - 15.x,Android 32 / 64,Windows 32 / 64和OSX进行了测试。ZXing.Delphi的目标是使扫描条形码毫不费力,无痛,快速,并在FireMonkey或本机Windows(VCL或Firemonkey)应用程序中构建。 只需包含源文件并将其添加到现有项目中,然后在项目中构建ZXing.Delphi源代码即可。
资源推荐
资源详情
资源评论
收起资源包目录
zxing.delphi是最新3.9.5版,支持到delphi 11.3,好用的条形码与二维码扫描源代码 (243个子文件)
code128-custom.bmp 384KB
dmc6.bmp 131KB
FmxTestApp.deployproj 67KB
aTestApp.deployproj 46KB
Unit2.dfm 1KB
MainForm.dfm 1KB
aTestApp.dpr 7KB
dUnitXTest.dpr 2KB
dUnitXTestTests.dpr 490B
Webcam.dpr 314B
Leaktest.dpr 246B
VclTestApp.dpr 234B
FmxTestApp.dpr 210B
FmxTestApp.dproj 146KB
aTestApp.dproj 98KB
Leaktest.dproj 78KB
dUnitXTest.dproj 66KB
Webcam.dproj 54KB
vclTestApp.dproj 51KB
dUnitXTestTests.dproj 8KB
MainForm.fmx 4KB
main.fmx 3KB
Unit1.fmx 940B
upca 2.gif 4KB
upca 3.gif 3KB
ean13.gif 2KB
.gitignore 2KB
ZXingDelphi.groupproj 3KB
128problem.jpg 221KB
qr problem 1.jpg 61KB
CarloTest.jpg 53KB
beantest.jpg 48KB
dmc8.jpg 39KB
LICENSE 11KB
README.md 9KB
VSample.pas 49KB
Test.pas 36KB
VFrames.pas 30KB
ZXing.QrCode.Internal.Version.pas 26KB
ZXing.QrCode.Internal.FinderPatternFinder.pas 25KB
ZXing.Datamatrix.Internal.DecodedBitStreamParser.pas 24KB
ZXing.OneD.Code128Reader.pas 21KB
ZXing.OneD.UPCEANReader.pas 19KB
ZXing.Datamatrix.Internal.BitMatrixParser.pas 19KB
ZXing.Datamatrix.Internal.Detector.pas 18KB
ZXing.Common.ReedSolomon.GenericGF.pas 17KB
ZXing.QrCode.Internal.DecodedBitStreamParser.pas 17KB
ZXing.RGBLuminanceSource.pas 16KB
ZXing.OneD.OneDReader.pas 16KB
ZXing.QrCode.Internal.Detector.pas 14KB
ZXing.QrCode.Internal.AlignmentPatternFinder.pas 13KB
ZXing.OneD.ITFReader.pas 12KB
ZXing.OneD.Code93Reader.pas 12KB
ZXing.OneD.Code39Reader.pas 11KB
ZXing.Common.BitMatrix.pas 11KB
ZXing.Common.BitArrayImplementation.pas 11KB
ZXing.QrCode.Internal.BitMatrixParser.pas 10KB
ZXing.ReadResult.pas 10KB
ZXing.Common.Detector.WhiteRectangleDetector.pas 10KB
ZXing.MultiFormatReader.pas 10KB
ZXing.QrCode.QRCodeReader.pas 10KB
ZXing.PlanarYUVLuminanceSource.pas 10KB
ZXing.Datamatrix.Internal.Version.pas 9KB
ZXing.QrCode.Internal.FormatInformation.pas 9KB
ZXing.HybridBinarizer.pas 9KB
ZXing.QrCode.Internal.Decoder.pas 8KB
ZXing.LuminanceSource.pas 8KB
ZXing.OneD.UPCEANExtension5Support.pas 8KB
ZXing.OneD.EANManufacturerOrgSupport.pas 8KB
ZXing.BaseLuminanceSource.pas 8KB
ZXing.DefaultGridSampler.pas 8KB
main.pas 8KB
ZXing.Common.PerspectiveTransform.pas 7KB
ZXing.QrCode.Internal.Mode.pas 7KB
ZXing.Common.ReedSolomon.ReedSolomonDecoder.pas 7KB
ZXing.Datamatrix.DataMatrixReader.pas 7KB
ZXing.ResultPoint.pas 7KB
ZXing.OneD.EAN13Reader.pas 7KB
ZXing.Datamatrix.Internal.Decoder.pas 7KB
ZXing.QrCode.Internal.DataMask.pas 7KB
ZXing.CharacterSetECI.pas 6KB
ZXing.StringUtils.pas 6KB
ZXing.GlobalHistogramBinarizer.pas 6KB
ZXing.QrCode.Internal.DataBlock.pas 6KB
ZXing.OneD.UPCEReader.pas 6KB
ZXing.Datamatrix.Internal.DataBlock.pas 5KB
ZXing.InvertedLuminanceSource.pas 5KB
ZXing.OneD.UPCEANExtension2Support.pas 5KB
ZXing.QrCode.Internal.FinderPattern.pas 5KB
MainForm.pas 5KB
ZXing.QrCode.Internal.FinderPatternImplementation.pas 5KB
ZXing.ScanManager.pas 4KB
ZXing.DecodeHintType.pas 4KB
ZXing.ResultPointImplementation.pas 4KB
ZXing.Common.GridSampler.pas 4KB
ZXing.Binarizer.pas 4KB
ZXing.QrCode.Internal.ErrorCorrectionLevel.pas 4KB
ZXing.OneD.UPCAReader.pas 4KB
ZXing.QrCode.Internal.AlignmentPatternImplementation.pas 4KB
ZXing.ResultMetadataType.pas 3KB
共 243 条
- 1
- 2
- 3
资源评论
- shoeserp2023-08-11delphi 10.4 编译的可以。delphi11 编译出来的不行。
Sodison
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功