Cross plafrom C# Qr code image generator
https://github.com/manuelbl/QrCodeGenerator
- Select Driver even on runtime
- Robustness in case on some platforms, some drawing libraries are having problems
- Modern Fluent API initialization (surely improvable)
- Added ready to use Payloads (allows generation of specific QrCodes)
- You can expand easily to support more advanced features exposed by original Library
- Added usage sample in Blazor
var qr = new QrDrawerFactory().GetDriver(DrawDriverType.SkiaSharp)
.SetQr("Hello World")
.SetImageFormat(CommonImageFormat.Png)
.GetBytes();
//------------------------------------------------------------------------------------
var msg = new PayloadGenerator.ContactData(
PayloadGenerator.ContactData.ContactOutputType.VCard4,
"Name",
"Surname",
"EvilMax"
).ToString();
var qr2 = new QrDrawerFactory().GetDriver(DrawDriverType.ImageSharp)
.SetQr(msg)
.SetImageFormat(CommonImageFormat.Png)
.Save("./Test.png");
public abstract GenericDrawer SetQr(QrCode QrCode);
public GenericDrawer SetQr(string QrText);
public abstract GenericDrawer SetScale(int Scale);
public abstract GenericDrawer SetBorder(int Border);
public abstract GenericDrawer SetForegroundColor(string Color);
public abstract GenericDrawer SetBackgroundColor(string Color);
public abstract GenericDrawer SetImageFormat(CommonImageFormat ImageFormat);
public abstract byte[] GetBytes();
public abstract bool Save(string Path);
- SkiaSharp
- ImageSharp
- Open to expansions...