Before starting the programing, download the SDK/NET frm aipsys.com
1. Contants:
1.1. encoding scheme
public static int ENC_ALPHA = 0;
public static int ENC_BYTE = 1;
public static int ENC_NUMERIC = 2;
public static int ENC_KANJI = 3;
public static int ENC_AUTO = 4;
1.2. Version
1~40
1.3. FNC1Mode
public static int FNC1_MODE_NO = 0;
public static int FNC1_MODE_FIRST = 1;
public static int FNC1_MODE_SECOND = 2;
1.4. Correction Level
public static int CORRECTION_LEVEL_L = 0;
public static int CORRECTION_LEVEL_M = 1;
public static int CORRECTION_LEVEL_Q = 2;
public static int CORRECTION_LEVEL_H = 3;
2. Class discription
public ImageEncoder()
public bool RegisterQRCodeEncoder(string strMail, string strRegCode)
public System.Drawing.Bitmap Encode2Image()
public bool Encode2ImageFile(string filename)
public byte ApplicationIndicator { set; get; }
public bool AutoConfigurate { set; get; }
public System.Drawing.Color BackGroundColor { set; get; }
public int ECI { set; get; }
public int Encoding { set; get; }
public int ErrorCorrectionLevel { set; get; }
public int Fnc1Mode { set; get; }
public System.Drawing.Color ForeGroundColor { set; get; }
public int MarginSize { set; get; }
public int ModuleSize { set; get; }
public bool ProcessTilde { set; get; }
public bool StructuredAppend { set; get; }
public int StructuredAppendCounter { set; get; }
public int StructuredAppendIndex { set; get; }
public string TextData { set; get; }
public int Version { set; get; }
3. Samples
3.1 Encode to Bitmap
ImageEncoder iee = new ImageEncoder();
iee.AutoConfigurate = true;
iee.ECI = -1;
iee.Encoding = ImageEncoder.ENC_AUTO;
iee.Fnc1Mode = ImageEncode.FNC1_MODE_NO;
iee.ErrorCorrectionLevel = ImageEncoder.CORRECTION_LEVEL_L;
iee.Version = 1;
iee.ProcessTilde = false;
iee.MarginSize = 10;
iee.ModuleSize = 4;
iee.StructuredAppend = false;
iee.StructuredAppendCounter = 0;
iee.StructuredAppendIndex = 0;
iee.TextData = "http://www.aipsys.com";
pictureBox1.Image = iee.Encode2Image();
3.2 Encode to file
ImageEncoder iee = new ImageEncoder();
iee.AutoConfigurate = true;
iee.ECI = -1;
iee.Encoding = ImageEncoder.ENC_AUTO;
iee.Fnc1Mode = ImageEncode.FNC1_MODE_NO;
iee.ErrorCorrectionLevel = ImageEncoder.CORRECTION_LEVEL_L;
iee.Version = 1;
iee.ProcessTilde = false;
iee.MarginSize = 10;
iee.ModuleSize = 4;
iee.StructuredAppend = false;
iee.StructuredAppendCounter = 0;
iee.StructuredAppendIndex = 0;
iee.TextData = "http://www.aipsys.com";
iee.Encode2ImageFile("c:\\qrtest.png");