Skip to content

Commit 5546139

Browse files
Merge pull request #1 from yebuyebu/main
speed/accuracy/readrate
2 parents a0a75b7 + 8d31970 commit 5546139

31 files changed

+1187
-73
lines changed

samples/BarcodeReaderSamples.sln

Lines changed: 101 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,101 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.30717.126
5-
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "HelloWorld\HelloWorld.csproj", "{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}"
7-
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneralSettings", "GeneralSettings\GeneralSettings.csproj", "{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}"
9-
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecodeFromScannerAndWebcam", "UseCases\DecodeFromScannerAndWebcam\DecodeFromScannerAndWebcam.csproj", "{BECBB563-8BFD-4C68-9F62-A82BD88357D5}"
11-
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessDocumentsByBarcodes", "UseCases\ProcessDocumentsByBarcodes\ProcessDocumentsByBarcodes.csproj", "{E5A72778-8CCE-434B-B640-086C5B1D40BE}"
13-
EndProject
14-
Global
15-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16-
Debug|Any CPU = Debug|Any CPU
17-
Debug|x86 = Debug|x86
18-
Release|Any CPU = Release|Any CPU
19-
Release|x86 = Release|x86
20-
EndGlobalSection
21-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22-
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23-
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Debug|Any CPU.Build.0 = Debug|Any CPU
24-
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Debug|x86.ActiveCfg = Debug|Any CPU
25-
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Debug|x86.Build.0 = Debug|Any CPU
26-
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Release|Any CPU.ActiveCfg = Release|Any CPU
27-
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Release|Any CPU.Build.0 = Release|Any CPU
28-
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Release|x86.ActiveCfg = Release|Any CPU
29-
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Release|x86.Build.0 = Release|Any CPU
30-
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31-
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
32-
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Debug|x86.ActiveCfg = Debug|Any CPU
33-
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Debug|x86.Build.0 = Debug|Any CPU
34-
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
35-
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Release|Any CPU.Build.0 = Release|Any CPU
36-
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Release|x86.ActiveCfg = Release|Any CPU
37-
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Release|x86.Build.0 = Release|Any CPU
38-
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39-
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
40-
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Debug|x86.ActiveCfg = Debug|x86
41-
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Debug|x86.Build.0 = Debug|x86
42-
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
43-
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Release|Any CPU.Build.0 = Release|Any CPU
44-
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Release|x86.ActiveCfg = Release|x86
45-
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Release|x86.Build.0 = Release|x86
46-
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47-
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
48-
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Debug|x86.ActiveCfg = Debug|Any CPU
49-
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Debug|x86.Build.0 = Debug|Any CPU
50-
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
51-
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Release|Any CPU.Build.0 = Release|Any CPU
52-
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Release|x86.ActiveCfg = Release|Any CPU
53-
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Release|x86.Build.0 = Release|Any CPU
54-
EndGlobalSection
55-
GlobalSection(SolutionProperties) = preSolution
56-
HideSolutionNode = FALSE
57-
EndGlobalSection
58-
GlobalSection(ExtensibilityGlobals) = postSolution
59-
SolutionGuid = {AFBF8B73-CABC-4914-BB17-E4385803C9F4}
60-
EndGlobalSection
61-
EndGlobal
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.1169
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "HelloWorld\HelloWorld.csproj", "{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneralSettings", "GeneralSettings\GeneralSettings.csproj", "{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecodeFromScannerAndWebcam", "UseCases\DecodeFromScannerAndWebcam\DecodeFromScannerAndWebcam.csproj", "{BECBB563-8BFD-4C68-9F62-A82BD88357D5}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessDocumentsByBarcodes", "UseCases\ProcessDocumentsByBarcodes\ProcessDocumentsByBarcodes.csproj", "{E5A72778-8CCE-434B-B640-086C5B1D40BE}"
13+
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeedFirstSettings", "Performance\SpeedFirstSettings\SpeedFirstSettings.csproj", "{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}"
15+
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccuracyFirstSettings", "Performance\AccuracyFirstSettings\AccuracyFirstSettings.csproj", "{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}"
17+
EndProject
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageDecoding", "ImageDecoding\ImageDecoding.csproj", "{178A8015-4375-45F0-BCFE-CEFF4598C4FF}"
19+
EndProject
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReadRateFirstSettings", "Performance\ReadRateFirstSettings\ReadRateFirstSettings.csproj", "{8128C04D-B2FF-4813-B249-FFBA481E830D}"
21+
EndProject
22+
Global
23+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
24+
Debug|Any CPU = Debug|Any CPU
25+
Debug|x86 = Debug|x86
26+
Release|Any CPU = Release|Any CPU
27+
Release|x86 = Release|x86
28+
EndGlobalSection
29+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
30+
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31+
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Debug|Any CPU.Build.0 = Debug|Any CPU
32+
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Debug|x86.ActiveCfg = Debug|Any CPU
33+
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Debug|x86.Build.0 = Debug|Any CPU
34+
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Release|Any CPU.ActiveCfg = Release|Any CPU
35+
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Release|Any CPU.Build.0 = Release|Any CPU
36+
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Release|x86.ActiveCfg = Release|Any CPU
37+
{93A25FAE-0618-4B06-A7C6-F32E75DCE06A}.Release|x86.Build.0 = Release|Any CPU
38+
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Debug|x86.ActiveCfg = Debug|Any CPU
41+
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Debug|x86.Build.0 = Debug|Any CPU
42+
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
43+
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Release|Any CPU.Build.0 = Release|Any CPU
44+
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Release|x86.ActiveCfg = Release|Any CPU
45+
{1BF547FD-D93B-472B-9BBF-2DB2E8C734B2}.Release|x86.Build.0 = Release|Any CPU
46+
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Debug|x86.ActiveCfg = Debug|x86
49+
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Debug|x86.Build.0 = Debug|x86
50+
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
51+
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Release|Any CPU.Build.0 = Release|Any CPU
52+
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Release|x86.ActiveCfg = Release|x86
53+
{BECBB563-8BFD-4C68-9F62-A82BD88357D5}.Release|x86.Build.0 = Release|x86
54+
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55+
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
56+
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Debug|x86.ActiveCfg = Debug|Any CPU
57+
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Debug|x86.Build.0 = Debug|Any CPU
58+
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Release|Any CPU.Build.0 = Release|Any CPU
60+
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Release|x86.ActiveCfg = Release|Any CPU
61+
{E5A72778-8CCE-434B-B640-086C5B1D40BE}.Release|x86.Build.0 = Release|Any CPU
62+
{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63+
{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
64+
{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}.Debug|x86.ActiveCfg = Debug|Any CPU
65+
{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}.Debug|x86.Build.0 = Debug|Any CPU
66+
{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
67+
{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}.Release|Any CPU.Build.0 = Release|Any CPU
68+
{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}.Release|x86.ActiveCfg = Release|Any CPU
69+
{14F46242-565C-4E16-9AB4-7E7BECEA6AF3}.Release|x86.Build.0 = Release|Any CPU
70+
{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
71+
{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
72+
{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}.Debug|x86.ActiveCfg = Debug|Any CPU
73+
{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}.Debug|x86.Build.0 = Debug|Any CPU
74+
{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
75+
{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}.Release|Any CPU.Build.0 = Release|Any CPU
76+
{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}.Release|x86.ActiveCfg = Release|Any CPU
77+
{6C76C5AB-9BCE-4BFB-A503-CDB1D5A9C3C1}.Release|x86.Build.0 = Release|Any CPU
78+
{178A8015-4375-45F0-BCFE-CEFF4598C4FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
79+
{178A8015-4375-45F0-BCFE-CEFF4598C4FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
80+
{178A8015-4375-45F0-BCFE-CEFF4598C4FF}.Debug|x86.ActiveCfg = Debug|Any CPU
81+
{178A8015-4375-45F0-BCFE-CEFF4598C4FF}.Debug|x86.Build.0 = Debug|Any CPU
82+
{178A8015-4375-45F0-BCFE-CEFF4598C4FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
83+
{178A8015-4375-45F0-BCFE-CEFF4598C4FF}.Release|Any CPU.Build.0 = Release|Any CPU
84+
{178A8015-4375-45F0-BCFE-CEFF4598C4FF}.Release|x86.ActiveCfg = Release|Any CPU
85+
{178A8015-4375-45F0-BCFE-CEFF4598C4FF}.Release|x86.Build.0 = Release|Any CPU
86+
{8128C04D-B2FF-4813-B249-FFBA481E830D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
87+
{8128C04D-B2FF-4813-B249-FFBA481E830D}.Debug|Any CPU.Build.0 = Debug|Any CPU
88+
{8128C04D-B2FF-4813-B249-FFBA481E830D}.Debug|x86.ActiveCfg = Debug|Any CPU
89+
{8128C04D-B2FF-4813-B249-FFBA481E830D}.Debug|x86.Build.0 = Debug|Any CPU
90+
{8128C04D-B2FF-4813-B249-FFBA481E830D}.Release|Any CPU.ActiveCfg = Release|Any CPU
91+
{8128C04D-B2FF-4813-B249-FFBA481E830D}.Release|Any CPU.Build.0 = Release|Any CPU
92+
{8128C04D-B2FF-4813-B249-FFBA481E830D}.Release|x86.ActiveCfg = Release|Any CPU
93+
{8128C04D-B2FF-4813-B249-FFBA481E830D}.Release|x86.Build.0 = Release|Any CPU
94+
EndGlobalSection
95+
GlobalSection(SolutionProperties) = preSolution
96+
HideSolutionNode = FALSE
97+
EndGlobalSection
98+
GlobalSection(ExtensibilityGlobals) = postSolution
99+
SolutionGuid = {AFBF8B73-CABC-4914-BB17-E4385803C9F4}
100+
EndGlobalSection
101+
EndGlobal

samples/GeneralSettings/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static void Main(string[] args)
1212
{
1313
// 1. Initialize license
1414
/*
15-
// By setting organizaion ID as "200001", a 7-day trial license will be used for license verification.
15+
// By setting organization ID as "200001", a 7-day trial license will be used for license verification.
1616
// Note that network connection is required for this license to work.
1717
//
1818
// When using your own license, locate the following line and specify your Organization ID.

samples/HelloWorld/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static void Main(string[] args)
1212
{
1313
// 1. Initialize license
1414
/*
15-
// By setting organizaion ID as "200001", a 7-day trial license will be used for license verification.
15+
// By setting organization ID as "200001", a 7-day trial license will be used for license verification.
1616
// Note that network connection is required for this license to work.
1717
//
1818
// When using your own license, locate the following line and specify your Organization ID.
@@ -73,4 +73,4 @@ static void Main(string[] args)
7373
Console.ReadKey();
7474
}
7575
}
76-
}
76+
}

samples/HelloWorld/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Dynamsoft.DotNet.Barcode" version="8.6.0" targetFramework="net472" />
4-
</packages>
3+
<package id="Dynamsoft.DotNet.Barcode" version="8.8.0" targetFramework="net472" />
4+
</packages>

samples/ImageDecoding/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5+
</startup>
6+
</configuration>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{178A8015-4375-45F0-BCFE-CEFF4598C4FF}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>ImageDecoding</RootNamespace>
10+
<AssemblyName>ImageDecoding</AssemblyName>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="Dynamsoft.BarcodeReader">
37+
<HintPath>..\packages\Dynamsoft.DotNet.Barcode.8.8.0\lib\net40\Dynamsoft.BarcodeReader.dll</HintPath>
38+
</Reference>
39+
<Reference Include="DynamsoftCommon">
40+
<HintPath>..\packages\Dynamsoft.DotNet.Barcode.8.8.0\lib\net40\DynamsoftCommon.dll</HintPath>
41+
</Reference>
42+
<Reference Include="System" />
43+
<Reference Include="System.Core" />
44+
<Reference Include="Microsoft.CSharp" />
45+
<Reference Include="System.Drawing" />
46+
<Reference Include="System.Windows.Forms" />
47+
</ItemGroup>
48+
<ItemGroup>
49+
<Compile Include="Program.cs" />
50+
<Compile Include="Properties\AssemblyInfo.cs" />
51+
</ItemGroup>
52+
<ItemGroup>
53+
<None Include="App.config" />
54+
<None Include="packages.config" />
55+
</ItemGroup>
56+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
57+
</Project>

samples/ImageDecoding/Program.cs

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
using System;
2+
using System.Drawing;
3+
using System.IO;
4+
using Dynamsoft;
5+
using Dynamsoft.DBR;
6+
using System.Windows.Forms;
7+
8+
9+
namespace ImageDecoding
10+
{
11+
class Program
12+
{
13+
static void Main(string[] args)
14+
{
15+
try
16+
{
17+
// Initialize license
18+
/*
19+
// By setting organization ID as "200001", a 7-day trial license will be used for license verification.
20+
// Note that network connection is required for this license to work.
21+
//
22+
// When using your own license, locate the following line and specify your Organization ID.
23+
// organizationID = "200001";
24+
//
25+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=dotnet
26+
*/
27+
DMDLSConnectionParameters connectionInfo = BarcodeReader.InitDLSConnectionParameters();
28+
connectionInfo.OrganizationID = "200001";
29+
EnumErrorCode errorCode = BarcodeReader.InitLicenseFromDLS(connectionInfo, out string errorMsg);
30+
if (errorCode != EnumErrorCode.DBR_SUCCESS)
31+
{
32+
Console.WriteLine(errorMsg);
33+
}
34+
35+
// Create an instance of Barcode Reader
36+
BarcodeReader dbr = new BarcodeReader();
37+
38+
39+
string filePath = "../../../../images/AllSupportedBarcodeTypes.png";
40+
TextResult[] results = null;
41+
42+
// Configure settings
43+
44+
// Through PublicRuntimeSetting
45+
46+
// Call GetRuntimeSettings to get current runtime settings.
47+
PublicRuntimeSettings settings = dbr.GetRuntimeSettings();
48+
49+
Bitmap bmp = new Bitmap(filePath);
50+
51+
results = dbr.DecodeBitmap(bmp, "");
52+
53+
if (results != null && results.Length > 0)
54+
{
55+
int i = 1;
56+
foreach (TextResult result in results)
57+
{
58+
string barcodeFormat = result.BarcodeFormat == 0 ? result.BarcodeFormatString_2 : result.BarcodeFormatString;
59+
string message = "Barcode" + i + ":" + barcodeFormat + "," + result.BarcodeText;
60+
Console.WriteLine(message);
61+
i++;
62+
}
63+
}
64+
else
65+
{
66+
Console.WriteLine("No data detected.");
67+
}
68+
}
69+
catch (Exception exp)
70+
{
71+
Console.WriteLine(exp.Message);
72+
}
73+
Console.WriteLine("Press any key to quit...");
74+
Console.ReadKey();
75+
}
76+
}
77+
}

0 commit comments

Comments
 (0)