Skip to content
forked from StefH/QRCode

QR Code : Encoder, Decoder and Fixer

Notifications You must be signed in to change notification settings

mohsen2hasani/QRCode

 
 

Repository files navigation

QRCode

Works in unix environments by install (apt-utils libgdiplus libc6-dev) packages.

You can set 'encoding', 'maskPattern' and 'qRCodeVersion' for your QR Code!

Sources copyright by Uzi Granot using CPOL. More details can be found in this blog.

NuGet packages

Name NuGet
QRCodeFixer NuGet Badge
QRCodeEncoder NuGet Badge
QRCodeDecoder NuGet Badge

QRFixer

Use this to fix a QR Code.

QR Code (damaged)

Damaged QRCode

QR Code (fixed)

Fixed QRCode

Configure Dependency Injection

...
services.AddQRCodeFixer();
...

Usage

var fixer = serviceProvider.GetRequiredService<QRCodeFixer>();

var data = fixer.FixAndSaveAsPng("qrcode-damaged.png", "qrcode-fixed.png");

QREncoder

Configure Dependency Injection

...
services.AddQRCodeEncoder();
...

Usage

var encoder = serviceProvider.GetRequiredService<QRCodeEncoder>();

var stringData = "test";
encoder.Encode(stringData);
encoder.SaveQRCodeToPngFile("qrcode.png");

QRDecoder

Configure Dependency Injection

...
services.AddQRCodeDecoder();
...

Usage

var decoder = _serviceProvider.GetRequiredService<QRDecoder>();
byte[][] data = decoder.ImageDecoder(sourceBitmap);

var data = QRDecoder.ByteArrayToString(data[0]);

References

About

QR Code : Encoder, Decoder and Fixer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.8%
  • Batchfile 0.2%