ByteScout Premium Suite - C# - Generate and check QR Code barcode with image inside - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Premium Suite – C# – Generate and check QR Code barcode with image inside

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Generate and check QR Code barcode with image inside

How to generate and check QR code barcode with image inside in C# with ByteScout Premium Suite

Continuous learning is a crucial part of computer science and this tutorial shows how to generate and check QR code barcode with image inside in C#

This sample source code below will display you how to generate and check QR code barcode with image inside in C#. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording and you can use it to generate and check QR code barcode with image inside with C#.

Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Premium Suite for generate and check QR code barcode with image inside below and use it in your application. Follow the instructions from scratch to work and copy the C# code. Enjoy writing a code with ready-to-use sample codes in C#.

ByteScout Premium 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)

Program.cs
      
using System; using Bytescout.BarCode; using Bytescout.BarCodeReader; namespace QRCodeWithImage { class Program { static void Main(string[] args) { // GENERATE QR CODE WITH DECOARATION IMAGE: 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 = Bytescout.BarCode.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); // CHECK THE BARCODE IS DECODABLE: // Create and activate barcode reader instance using (Reader reader = new Reader("demo", "demo")) { // Enable QR Code decoding reader.BarcodeTypesToFind.QRCode = true; // Read barcode from generated image FoundBarcode[] foundBarcodes = reader.ReadFrom(outputFile); // Check result if (foundBarcodes.Length > 0 && foundBarcodes[0].Type == Bytescout.BarCodeReader.SymbologyType.QRCode) Console.WriteLine("Barcode is decodable."); else Console.WriteLine("Barcode is not decodable!"); } Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadKey(); } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next