当前位置:网站首页>How does LeadTools detect, read and write barcodes
How does LeadTools detect, read and write barcodes
2020-11-06 22:27:00 【roffey】
There are many multi page files in the workplace . Able to load 、 Splitting and extraction are important requirements for many applications . Some of the most common types of files :PDF,TIFF and Microsoft Office Format , for example Docx,Doc,Xls and Xlsx.LEADTOOLS Supports all of these formats as well as 30 Many other multi page formats . Because there are many different types of multi page formats , So trying to support common formats can be a headache , And trying to support all of these formats is like a nightmare . Fortunately, ,LEADTOOLS SDK This application can be completed in less than five lines of code .
LEADTOOLS (Lead Technology) from Moe Daher and Rich Little Founded in 1990 year , Its headquarters are in Charlotte, North Carolina .LEAD Is established to make Daher Mr. Wang's invention in the field of digital image and compression technology is market-oriented . In the past, more than 30 In the course of development in ,LEAD With its market leadership in major countries around the world , It has become an established global leader in the field of digital image development tools .LEADTOOLS Developed and released LEAD It's an award-winning development kit .
Click to see LEADTOOLS Series of products
When encoding and decoding machine-readable data within a barcode , Speed and accuracy are the key .LEADTOOLS Provides a top-level computer vision barcode library than any other bar code on the market SDK All faster , More reliable , This ensures that you always get the best results .
Whether it's found on the back of your license PDF417 bar code , On the sticker is QR bar code , Or on the back of the product is UPC bar code ,LEADTOOLS Can support it and 100 A variety of different bar code symbols .
Just four lines of code , You can determine the symbol system of the bar code , Scope, etc . Whatever the angle or the color , Can quickly find and decode all supported symbol systems . To improve accuracy ,LEAD There are many different configuration options available , for example EnableDoublePass,EnablePreprocessing and EnableFastMode, To modify the behavior of barcode decoding to suit your application requirements .
Below C# The code shows you everything you need to detect and decode barcodes in an image . If you need a complete step-by-step tutorial , Check out our tutorial , This guide describes how to detect and extract barcodes and how to 1D and 2D The barcode is written into the image .
// READ BARCODE
static void ReadBarcode(RasterImage image)
{
BarcodeEngine barcodeEngineInstance = new BarcodeEngine();
try
{
BarcodeData[] dataArray = barcodeEngineInstance.Reader.ReadBarcodes(image, LeadRect.Empty, 0, null);
StringBuilder sb = new StringBuilder();
sb.AppendFormat("{0} barcode(s) found", dataArray.Length);
sb.AppendLine();
for (int i = 0; i < dataArray.Length; i++)
{
BarcodeData data = dataArray[i];
sb.AppendFormat("Symbology: {0}, Location: {1}, Data: {2}", data.Symbology.ToString(), data.Bounds.ToString(), data.Value);
sb.AppendLine();
}
Console.WriteLine(sb.ToString());
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
Console.ReadLine();
}
// GENERATE BARCODE
static void WriteUPCABarcode(RasterImage image)
{
BarcodeData data = new BarcodeData
{
Symbology = BarcodeSymbology.UPCA,
Value = "01234567890",
Bounds = new LeadRect(10, 10, 600, 200)
};
OneDBarcodeWriteOptions options = new OneDBarcodeWriteOptions
{
EnableErrorCheck = true,
TextPosition = BarcodeOutputTextPosition.Default
};
barcodeEngine.Writer.WriteBarcode(image, data, options);
}
Give it a try !
Test yourself , Please make sure to get the latest... Free of charge from our website LEADTOOLS SDK assessment ( If not already installed ). The trial version is valid for 60 God .
Please keep an eye on , We will continue to release more tutorials , Programmers can use these tutorials to develop direct impact data capture , distinguish , Exchange applications with other urgent business needs .
版权声明
本文为[roffey]所创,转载请带上原文链接,感谢
边栏推荐
- Introduction to the development of small game cloud
- STM32F030F4P6兼容灵动微MM32F031F4P6
- Common mathematical basic formulas of recursive and backtracking algorithms
- 移动端像素适配方案
- Google browser realizes video playback acceleration function
- Empty test suite appears in JUnit test
- 超高频RFID医疗血液管理系统应用
- Characteristics of magnetic memory chip STT-MRAM
- List to map (split the list according to the key, and the value of the same key is a list)
- 高速公路二维码定位报警系统
猜你喜欢
JS string - string string object method
The memorandum model of behavior model
Erd-online free online database modeling tool
应用层软件开发教父教你如何重构,资深程序员必备专业技能
Detect certificate expiration script
[byte jumps, autumn recruitment Posts open] ohayoo! Don't leave after school, I want to ask you to play games!!!
Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)
Design of NAND flash interface control
Markdown tricks
How does varhart xgantt represent working days on a calendar
随机推荐
ImageMagick - add watermark
打工人好物——磨炼钢铁意志就要这样高效的电脑
JS string - string string object method
Unexpected element.. required element
[learning] interface test case writing and testing concerns
List to map (split the list according to the key, and the value of the same key is a list)
2020-08-20:GO语言中的协程与Python中的协程的区别?
Google browser realizes video playback acceleration function
20 XR projects roadshows, nearly 20 capital institutions attended! We sincerely invite you to attend the 2020 qcomm XR eco Partner Conference
2020 database technology conference helps technology upgrade
The role of theme music in games
August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)
大佬们如何在nginx镜像里面增加模块?
August 18, 2020: introduce Mr process?
Erd-online free online database modeling tool
The essence of transaction and the principle of deadlock
How to manage the authority of database account?
September 3, 2020: naked writing algorithm: loop matrix traversal.
2020-08-17: how to solve data skew in detail?