ByteScout Barcode Suite - C++ - Read barcode from image with barcode reader sdk - ByteScout

ByteScout Barcode Suite – C++ – Read barcode from image with barcode reader sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – C++ – Read barcode from image with barcode reader sdk

How to read barcode from image with barcode reader sdk in C++ using ByteScout Barcode Suite

Continuous learning is a crucial part of computer science and this tutorial shows how to read barcode from image with barcode reader sdk in C++

Read barcode from image with barcode reader sdk is simple to apply in C++ if you use these source codes below. ByteScout Barcode Suite can read barcode from image with barcode reader sdk. It can be applied from C++. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK).

The SDK samples given below describe how to quickly make your application do read barcode from image with barcode reader sdk in C++ with the help of ByteScout Barcode Suite. Follow the instructions from scratch to work and copy the C++ code. Complete and detailed tutorials and documentation are available along with installed ByteScout Barcode Suite if you’d like to learn more about the topic and the details of the API.

ByteScout Barcode Suite free trial version is available on our website. C++ and other programming languages are supported.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

AssemblyInfo.cpp
      
#include "stdafx.h" using namespace System; using namespace System::Reflection; using namespace System::Runtime::CompilerServices; using namespace System::Runtime::InteropServices; using namespace System::Security::Permissions; // // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // [assembly:AssemblyTitleAttribute("HelloWorld")]; [assembly:AssemblyDescriptionAttribute("")]; [assembly:AssemblyConfigurationAttribute("")]; [assembly:AssemblyCompanyAttribute("")]; [assembly:AssemblyProductAttribute("HelloWorld")]; [assembly:AssemblyCopyrightAttribute("Copyright (c) 2010")]; [assembly:AssemblyTrademarkAttribute("")]; [assembly:AssemblyCultureAttribute("")]; // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the value or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly:AssemblyVersionAttribute("1.0.*")]; [assembly:ComVisible(false)]; [assembly:CLSCompliantAttribute(true)]; [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

CommonExample.cpp
      
#include "stdafx.h" using namespace System; using namespace System::IO; using namespace System::Drawing; using namespace Bytescout::BarCodeReader; int main(array<System::String ^> ^args) { String ^path = "BarcodePhoto.jpg"; Console::WriteLine("Reading barcode(s) from image " + Path::GetFullPath(path)); Reader ^bc = gcnew Reader(); // Set to find all barcode types bc->BarcodeTypesToFind->All = true; // But we recommend to use specific barcode types to avoid false positives, e.g.: // bc->BarcodeTypesToFind->QRCOde = true; // bc->BarcodeTypesToFind->Code39 = true; // Decode barcodes bc->ReadFrom(path); for (int i=0; i < bc->FoundCount; i++) { Console::WriteLine("Found barcode with type: " + bc->GetFoundBarcodeType(i).ToString() + " and value: " + bc->GetFoundBarcodeValue(i)); } Console::WriteLine("Press any key to exit.."); Console::ReadKey(); return 0; }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

resource.h
      
//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by app.rc

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

stdafx.cpp
      
// stdafx.cpp : source file that includes just the standard includes // HelloWorld.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h"

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

stdafx.h
      
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once // TODO: reference additional headers your program requires here

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next