Open-source library for generating QR codes from text strings and byte arrays.
The library is built for .NET Standard 2.0 and therefore runs on most modern .NET platforms (.NET Core, .NET Framework, Mono etc.).
It is mostly a translation of Project Nayuki's Java version of the QR code generator. The project provides implementations for many more programming languages, and the Project Nayuki web site has additional information about the implementation.
Core features:
Manual parameters:
Optional advanced features:
Create a new Visual Studio project for .NET Core 2.x (File > New > Project... / Visual C# > .NET Core > Console App (.NET Core))
Add the library via NuGet:
Either via Project > Manage NuGet Packages... / Browse / search for qrcodegenerator / Install
Or by running a command in the Package Manager Console
Install-Package Net.Codecrete.QrCodeGenerator -Version 1.5.0
Add the code from the example below
Run it
See DocFX API Documentation
Simple operation
using Net.Codecrete.QrCodeGenerator;
namespace Examples
{
class SimpleOperation
{
static void Main(string[] args)
{
var qr = QrCode.EncodeText("Hello, world!", QrCode.Ecc.Medium);
using (var bitmap = qr.ToBitmap(4, 10))
{
bitmap.Save("qr-code.png", ImageFormat.Png);
}
}
}
}
Manual operation
using Net.Codecrete.QrCodeGenerator;
namespace Examples
{
class ManualOperation
{
static void Main(string[] args)
{
var segments = QrCode.MakeSegments("3141592653589793238462643383");
var qr = QrCode.EncodeSegments(segments, QrCode.Ecc.High, 5, 5, 2, false);
for (int y = 0; y < qr.Size; y++)
{
for (int x = 0; x < qr.Size; x++)
{
... paint qr.GetModule(x,y) ...
}
}
}
}
}
QR Code Generator for .NET requires a .NET implementation compatible with .NET Standard 2.0 or higher, i.e. any of:
For generating raster images, the System.Drawing library is used. On Linux and macOS, it depends on the native shared library GDIPlus, which must be separatley installed.
macOS:
brew install mono-libgdiplus
Linux
sudo apt-get install libgdiplus
For troubleshooting, check Mono's GDIPlusInit page.
This project is a downgrade of QrCodeGenerator for C# 2.0. You can find original project and more information here about latest changes
Copyright Manuel Bleichenbacher & Project Nayuki & ArdeshirV@protonmail.com, Licensed under MIT
🪣 A practical e-commerce modular monolith sample, built with .Net Core, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
Home for C# .NET developers! ❤ Let's build public web sites, progressive web apps, android, iOS and Windows apps using bit platform!
🛍️ A practical e-commerce microservices sample, built with C#, .Net Core, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
List of awesome tips and tricks, resources, videos and articles in .net, software architecture, microservice and cloud-native
Task management application based on .NET 6 with DDD, CQRS, Event Sourcing and Testing Concepts
کتابخانه ها و مستندات مربوط به روال پرداخت یاری شاپرک - طبق مستندات رسمی شاپرک
A clone of "Swipe Brick Breaker" made with Unity
Booking Microservices is a Sample application for booking ticket. This application based on different software architecture and technologies like .Net Core, CQRS, DDD, Vertical Slice Architecture, Docker, kubernetes, tye, masstransit, RabbitMQ, Grpc, yarp...