This project is read-only.

QrCode Wiki:

Index: (Documentation for latest source code)

Developer Documentation for Contributors

Last edited Mar 3, 2013 at 5:08 AM by Silverlancer, version 16


MendezSaldias Dec 7, 2016 at 1:36 PM 
private Bitmap GenerateQRCode(string text, System.Drawing.Color DarkColor, System.Drawing.Color LightColor)
Gma.QrCodeNet.Encoding.QrEncoder Encoder = new Gma.QrCodeNet.Encoding.QrEncoder(Gma.QrCodeNet.Encoding.ErrorCorrectionLevel.H);
Gma.QrCodeNet.Encoding.QrCode Code = Encoder.Encode(text);
Bitmap TempBMP = new Bitmap(Code.Matrix.Width, Code.Matrix.Height);
for (int X = 0; X <= Code.Matrix.Width - 1; X++)
for (int Y = 0; Y <= Code.Matrix.Height - 1; Y++)
if (Code.Matrix.InternalArray[X, Y])
TempBMP.SetPixel(X, Y, DarkColor);
TempBMP.SetPixel(X, Y, LightColor);
return TempBMP;

narenkumar851 Jan 27, 2015 at 4:07 AM 
Try this , its a very easy method

Bad_Syntax May 27, 2014 at 4:13 PM 
Great job, though I couldn't get any of the C# code to convert to VB.NET without numerous errors. I just wrote a function from scratch instead:

VB.NET code to get a QR image:

Private Function GenerateQRCode(URL As String, DarkColor As System.Drawing.Color, LightColor As System.Drawing.Color) As Bitmap
Dim Encoder As New Gma.QrCodeNet.Encoding.QrEncoder(Gma.QrCodeNet.Encoding.ErrorCorrectionLevel.L)
Dim Code As Gma.QrCodeNet.Encoding.QrCode = Encoder.Encode(URL)
Dim TempBMP As New Bitmap(Code.Matrix.Width, Code.Matrix.Height)
For X As Integer = 0 To Code.Matrix.Width - 1
For Y As Integer = 0 To Code.Matrix.Height - 1
If Code.Matrix.InternalArray(X, Y) Then TempBMP.SetPixel(X, Y, DarkColor) Else TempBMP.SetPixel(X, Y, LightColor)
Return TempBMP
End Function