ByteScout BarCode Generator SDK - C# - QR Code Barcode With Image inside - ByteScout

ByteScout BarCode Generator SDK – C# – QR Code Barcode With Image inside

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – C# – QR Code Barcode With Image inside

QR code barcode with image inside in C# and ByteScout Barcode SDK

QR code barcode with image inside in C#

Today we will explain the steps and algorithm of implementing QR code barcode with image inside and how to make it work in your application. ByteScout Barcode SDK helps with QR code barcode with image inside in C#. ByteScout Barcode SDK is the robost SDK that generates high quality barcode images and pdf. Can generate all popular types of barcodes from QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix to more exotic barcode types. Fully customizable fonts, colors, print sizes. Includes special functions to ensure output quality, and tools for adding barcodes to new or existing pdf files and images.

Fast application programming interfaces of ByteScout Barcode SDK for C# plus the instruction and the C# code below will help you quickly learn QR code barcode with image inside. Follow the instruction from the scratch to work and copy and paste code for C# into your editor. Use of ByteScout Barcode SDK in C# is also explained in the documentation included along with the product.

ByteScout Barcode SDK free trial version is available for download from our website. Free trial also includes programming tutorials along with source code samples.

Try it today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; using Bytescout.BarCode; namespace QRCodeWithImage { class Program { static void Main(string[] args) { const string decorationImageFile = @".\logo.png"; const string outputFile = @".\barcode.png"; const string barcodeValue = "1234567890 abcdefghijklmnopqrstuvwxyz 1234567890 abcdefghijklmnopqrstuvwxyz"; // Create and activate barcode generator instance using (Barcode barcode = new Barcode("demo", "demo")) { // Set barcode type barcode.Symbology = SymbologyType.QRCode; // Set high QR Code error correction level barcode.Options.QRErrorCorrectionLevel = QRErrorCorrectionLevel.High; // Set barcode value barcode.Value = barcodeValue; // Add decoration image and scale it to 15% of the barcode square barcode.AddDecorationImage(decorationImageFile, 15); // Save generated barcode barcode.SaveImage(outputFile); Console.WriteLine("Barcode saved to " + outputFile); Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadKey(); } } } }

Try it today: Get 60 Day Free Trial or sign up for Web API

QRCodeWithImage.csproj
      
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{0EC915DC-3599-492C-9D20-E78F45EE834C}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>QRCodeWithImage</RootNamespace> <AssemblyName>QRCodeWithImage</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="Bytescout.BarCode, Version=4.62.0.967, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>C:\Program Files\Bytescout BarCode Generator SDK\net4.00\Bytescout.BarCode.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="System.Drawing" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Content Include="logo.png"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

QRCodeWithImage.sln
      
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCodeWithImage", "QRCodeWithImage.csproj", "{0EC915DC-3599-492C-9D20-E78F45EE834C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0EC915DC-3599-492C-9D20-E78F45EE834C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0EC915DC-3599-492C-9D20-E78F45EE834C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EC915DC-3599-492C-9D20-E78F45EE834C}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EC915DC-3599-492C-9D20-E78F45EE834C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Try it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout Barcode SDK page

Explore ByteScout Barcode SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next