Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created June 24, 2026 05:37
Show Gist options
  • Select an option

  • Save aspose-com-gists/39089b4a125452fcbb7e136b4909f924 to your computer and use it in GitHub Desktop.

Select an option

Save aspose-com-gists/39089b4a125452fcbb7e136b4909f924 to your computer and use it in GitHub Desktop.
Create Micro QR Code in .NET

Create Micro QR Code in .NET

This tutorial shows .NET developers how to create Micro QR codes with Aspose.BarCode for .NET. You'll install the SDK, generate a Micro QR code, set size and error correction, configure parameters, and optimize performance for mobile and embedded use.

Read the full guide here: https://blog.aspose.com/barcode/create-micro-qr-code-in-dotnet/

using System;
using Aspose.BarCode;
using Aspose.BarCode.Generation;
class Program
{
static void Main()
{
// Data to encode
string qrData = "https://example.com";
// Initialize the generator for Micro QR
using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MicroQR, qrData))
{
// Set the module size (pixel size of each QR square)
generator.Parameters.Barcode.XDimension = 2; // 2 pixels per module
// Choose error correction level (L, M, Q, H)
generator.Parameters.Barcode.QR.ErrorLevel = QRErrorLevel.Medium;
// Optional: set a specific QR version (1‑40). 0 = auto.
generator.Parameters.Barcode.QR.Version = 0;
// Save the QR code as PNG
generator.Save("MicroQR.png", BarCodeImageFormat.Png);
}
Console.WriteLine("Micro QR code generated successfully.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment