Gma.QrCodeNet.Encoding Table at chapter 8.4.3. P.21 Convert char to int value Alpha Numeric Char Table from chapter 8.4.3 P21 ISO/IEC 18004:2000 Table 3 Page 18 Used to define length of the Character Count Indicator Returns the 0 based index of the row from Chapter 8.4 Data encodation, Table 3 — Number of bits in Character Count Indicator. ISO/IEC 18004:2000 Chapter 8.1 Page 14 DataEncode is combination of Data analysis and Data encodation step. Which uses sub functions under several different namespaces ISO/IEC 18004:2006 Chapter 6.4.2 Mode indicator = 0111 Page 23 Initialize ECI Set. AppendOption is enum under ECISet Use NameToValue during Encode. ValueToName during Decode ISO/IEC 18004:2006E ECI Designator Page 24 Range: 0 ~ 999999 Number of Codewords(Byte) for ECI Assignment Value ISO/IEC 18004:2006E ECI Designator Page 24 Range: 0 ~ 999999 Number of bits for ECI Assignment Value ISO/IEC 18004:2006E ECI Designator Page 24 Range: 0 ~ 999999 Number of bits for ECI Header ECI table in Dictionary collection ISO/IEC 18004:2006 Chapter 6.4.2 Page 24. Length indicator for number of ECI codewords ISO/IEC 18004:2006 Chapter 6.4.2 Page 24. 1 codeword length = 0. Any additional codeword add 1 to front. Eg: 3 = 110 Bits required for each one is: one = 1, two = 2, three = 3 Use to recognise which mode and encoding name to use for input string. input string content Output encoding name Mode and Encoding name Encoding.GetEncoding.GetBytes will transform char to 0x3F if that char not belong to current encoding table. 0x3F is '?' Check char from startPos for string content. input string content start check position -2 Numeric encode, -1 AlphaNum encode, Index of failed check pos Use given encoding to check input string from starting position. If encoding table is suitable solution. it will return -1. Else it will return failed encoding position. input string encoding name. Check ECI table starting position -1 if from starting position to end encoding success. Else return fail position Check input string content. Whether it can apply Kanji encode or not. String input content -1 if it can apply Kanji encode, -2 should use utf8 encode, 0 check for other encode. Calculate int length by search for Most significant bit Input Number Most significant bit Search for right side bit of Most significant bit input number lower boundary. At start should be 0 higher boundary. At start should be 32 Most significant bit - 1 With input number and polynomial number. Method will calculate BCH value and return input number Polynomial number BCH value ISO/IEC 18004:2000 Chapter 8.7.3 Page 46 6.9 Format information The Format Information is a 15 bit sequence containing 5 data bits, with 10 error correction bits calculated using the (15, 5) BCH code. ISO/IEC 18004:2000 Chapter 8.9 Page 53 From Appendix C in JISX0510:2004 (p.65). From Appendix C in JISX0510:2004 (p.65). Embed format information to tristatematrix. Process combination of create info bits, BCH error correction bits calculation, embed towards matrix. ISO/IEC 18004:2000 Chapter 8.9 Page 53 Embed version information for version larger or equal to 7. ISO/IEC 18004:2000 Chapter 8.10 Page 54 Embed version information to Matrix Only for version greater or equal to 7 Matrix version number Generate error correction blocks. Then out put with codewords BitList ISO/IEC 18004/2006 P45, 46. Chapter 6.6 Constructing final message codewords sequence. Datacodewords from DataEncodation.DataEncode Total number of bytes Number of data bytes Number of Error Correction blocks codewords BitList contain datacodewords and ECCodewords ISO/IEC 18004:2000 Chapter 8.8.2 Page 52 Calculate penalty value for first rule. ISO/IEC 18004:2000 Chapter 8.8.2 Page 52 ISO/IEC 18004:2000 Chapter 8.8.2 Page 52 Calculate penalty value for Third rule. ISO/IEC 18004:2000 Chapter 8.8.2 Page 52 Calculate penalty value for Fourth rule. Perform O(n) search for available x modules Description of PenaltyFactory. EightBitByte is a bit complicate compare to other encoding. It can accept several different encoding table from global ECI table. For different country, default encoding is different. JP use shift_jis, International spec use iso-8859-1 China use ASCII which is first part of normal char table. Between 00 to 7E Korean and Thai should have their own default encoding as well. But so far I can not find their specification freely online. QrCode.Net will use international standard which is iso-8859-1 as default encoding. And use UTF8 as suboption for any string that not belong to any char table or other encoder. ISO/IEC 18004:2000 Chapter 8.4.4 Page 22 Returns the bit representation of input data. Returns bit representation of value. See Chapter 8.4 Data encodation, Table 2 — Mode indicators Defines the length of the Character Count Indicator, which varies according to themode and the symbol version in use Number of bits in Character Count Indicator. See Chapter 8.4 Data encodation, Table 3 — Number of bits in Character Count Indicator. Bitcount, Chapter 8.4.4, P.24 EightBitByte encoder's encoding will change according to different region Default encoding is "iso-8859-1" ISO/IEC 18004:2000 Chapter 8.4.5 Page 23 Bitcount according to ISO/IEC 18004:2000 Kanji mode Page 25 Multiply value for Most significant byte. Chapter 8.4.5 P.24 See Chapter 8.4.5 P.24 Kanji Mode Description of GaloisField256. Powers of a in GF table. Where a = 2 log ( power of a) in GF table. Where a = 2 Product of two values. In other words. a multiply b Quotient of two values. In other words. a devided b Description of GeneratorPolynomial. After create GeneratorPolynomial. Keep it as long as possible. Unless QRCode encode is done or no more QRCode need to generate. Get generator by degree. (Largest degree for that generator) Generator Build Generator if we can not find specific degree of generator from cache coefficient position. where (coefficient)x^degree Add another Polynomial to current one The polynomial need to add or subtract to current one Result polynomial after add or subtract Multiply current Polynomial to anotherone. Result polynomial after multiply Multiplay scalar to current polynomial result of polynomial after multiply scalar divide current polynomial by "other" Result polynomial after divide Encode an array of data codeword with GaloisField 256. Array of data codewords for a single block. Number of error correction codewords for data codewords Cached or newly create GeneratorPolynomial Return error correction codewords array Convert data codewords to int array. And add error correction space at end of that array data codewords array data codewords length Num of error correction bytes Int array for data codewords array follow by error correction space Reassembly error correction codewords. As Polynomial class will eliminate zero monomial at front. Remainder byte array after divide. Error correction codewords length Error correction codewords Contain most of common constant variables. S ISO/IEC 18004:2006(E) Page 45 Chapter Generating the error correction codewords Primative Polynomial = Bin 100011101 = Dec 285 0xEC 0x11 URL:http://en.wikipedia.org/wiki/Byte-order_mark Return value will be internal array itself. Not deep/shallow copy. This method will create BitList that contain terminator, padding and pad codewords for given datacodewords. Use it to full fill the data codewords capacity. Thus avoid massive empty bits. ISO/IEC 18004:2006 P. 32 33. Terminator / Bit stream to codeword conversion Method will add terminator bits at end of baseList Num of bits for datacodewords without terminator Total number of datacodewords for specific version. Receive it under Version/VersionTable Bitlist that contain Terminator, padding and padcodewords Return value will be deep copy of array. Width for current version number of Error correction blocks for group 1 Number of error correction blocks for group 2 Number of data bytes per block for group 1 Number of data bytes per block for group 2 Number of error correction bytes per block Get Error Correction Blocks Initialize for NumBlocks and ErrorCorrectionCodewordsPerBlock Use this exception for null or empty input string or when input string is too large. L M Q H Get Error Correction Blocks by level Determine which version to use Number of bits for encoded content Encoding name for EightBitByte VersionDetail and ECI Decide which version group it belong to number of bits for bitlist where it contain DataBits encode from input content and ECI header Error correction level Mode Version group index for VERSION_GROUP Use number of data bits(header + eci header + data bits from EncoderBase) to search for proper version to use between min and max boundary. Boundary define by DynamicSearchIndicator method. We only need totalCodeWords, dataCodewords and number of blocks. Other variable can be calculate through equation by given that three variables. This table try to use original table layout for easier error detection. ISO/IEC 18004/2006 Tabler 9 Page 38 Only include non-micro QRCode Sorted list ISO/IEC 18004:2000 Chapter 8.4.3 Alphanumeric Page 21 Constant from Chapter 8.4.3 Alphanumeric Mode. P.21 BitCount from chapter 8.4.3. P22 ISO/IEC 18004:2000 Chapter 8.4.2 Page 19 Default QrEncoder will set ErrorCorrectionLevel as M QrEncoder with parameter ErrorCorrectionLevel. Encode string content to QrCode matrix This exception for string content is null, empty or too large Try to encode content False if input content is empty, null or too large. Encode byte array content to QrCode matrix This exception for string content is null, empty or too large Try to encode content False if input content is empty, null or too large. This class contain two variables. BitMatrix for QrCode isContainMatrix for indicate whether QrCode contains BitMatrix or not. BitMatrix will equal to null if isContainMatrix is false. Lock Class, that any change to Text or ErrorCorrectLevel won't cause it to update QrCode Matrix Unlock Class, then update QrCodeMatrix and repaint Freeze Class, Any value change to Brush, QuietZoneModule won't cause immediately repaint. It won't stop any repaint cause by other action. Unfreeze and repaint immediately. Get Qr SquareBitMatrix as two dimentional bool array. It will be deep copy of control's internal bitmatrix. null if matrix is null, else full matrix Return whether if class is freezed. Return whether if class is locked Lock Class, that any change to Text or ErrorCorrectLevel won't cause it to update QrCode Matrix Unlock Class, then update QrCodeMatrix and redraw image Freeze Class, Any value change to Brush, QuietZoneModule won't cause immediately redraw image. Unfreeze and redraw immediately. Get Qr SquareBitMatrix as two dimentional bool array. It will be deep copy of control's internal bitmatrix. null if matrix is null, else full matrix Return whether if class is freezed. Return whether if class is locked Calculate background and fronntcolor's contrast ratio. To assist dark module and light module's choose. Higher ratio means easier to decode by decoder. Black and White will have highest ratio = 21. light module color dark module color Contrast object. Initialize renderer Size calculation strategy Initialize renderer Size calculation strategy Color for dark module Color for light module Draw QrCode at given writeable bitmap Draw QrCode at given writeable bitmap at offset location Draw quiet zone at offset x,y Draw qrCode dark modules at given position. (It will also include quiet zone area. Set it to zero to exclude quiet zone) Bitmatrix, wBitmap should not equal to null wBitmap's pixel width or height should not equal to zero Initialize Renderer. Default brushes will be black and white. Initialize Renderer. Draw QrCode to DrawingBrush DrawingBrush, Stretch = uniform LightBrush will not use by this method, DrawingBrush will only contain DarkBrush part. Use LightBrush to fill background of main uielement for more flexible placement Construct QrCode geometry. It will only include geometry for Dark colour module QrCode dark colour module geometry. Size = QrMatrix width x width Construct DrawingBrush with input Drawing DrawingBrush where Stretch = uniform Write image file to stream Default DPI will be 96, 96 Write image file to stream DPI = DPI.X, DPI.Y(Dots per inch) Module pixel width QrCode pixel width Initializes a Encapsulated PostScript renderer. DarkColor used to draw Dark modules of the QrCode LightColor used to draw Light modules and QuietZone of the QrCode. Setting to a transparent color (A = 0) allows transparent light modules so the QR Code blends in the existing background. In that case the existing background should remain light and rather uniform, and higher error correction levels are recommended. Renders the matrix in an Encapsuled PostScript format. The matrix to be rendered Size in points (1 inch contains 72 point in PostScript) of a module Output stream that must be writable Outputs the EPS header with mandatory declarations, variable declarations and function definitions. The matrix to be rendered Size in points (1 inch contains 72 point in PostScript) of a module Output text stream Outputs the background unless it is defined as transparent. The background is used for light modules and quiet zone. The matrix to be rendered Output text stream Draw a square for each dark module The matrix to be rendered Output text stream Use the 'image' or 'colorimage' PostScript command to render modules The matrix to be rendered Output text stream Outputs the mandatory EPS footer. Output text stream ISizeCalculation for the way to calculate QrCode's pixel size. Ex for ISizeCalculation:FixedCodeSize, FixedModuleSize DarkColor used to draw Dark modules of the QrCode LightColor used to draw Light modules and QuietZone of the QrCode. Setting to a transparent color (A = 0) allows transparent light modules so the QR Code blends in the existing background. In that case the existing background should remain light and rather uniform, and higher error correction levels are recommended. Selection of the technique used to draw the modules. 'Squares' draws vector squares one by one; 'Image' uses the 'image' or 'colorimage' PostScript command. 'Squares' supports transparency of light modules and often has smaller file size for color QR Codes. 'Image' might be faster to render on some devices as it is a single command. FixedCodeSize is strategy for rendering QrCode at fixed Size. Fixed size for QrCode pixel width. Pixel width have to be bigger than QrCode's matrix width(include quiet zone) QrCode matrix width is between 25 ~ 182(version 1 ~ 40). Interface function that use by Rendering class. QrCode matrix width Module pixel size and QrCode pixel width QrCodeWidth is pixel size of QrCode you would like to print out. It have to be greater than QrCode's matrix width(include quiet zone). QrCode matrix width is between 25 ~ 182(version 1 ~ 40). Number of quietZone modules FixedModuleSize is strategy for rendering QrCode with fixed module pixel size. Module pixel size number of quiet zone modules Interface function that use by Rendering class. QrCode matrix width Module pixel size and QrCode pixel width Module pixel size. Have to greater than zero Number of quietZone modules Initialize Renderer. Default brushes will be black and white. The way of calculate Size Initialize Renderer The way of calculate Size Drawing Bitmatrix to winform graphics. Default position will be 0, 0 Draw background only for null matrix DarkBrush or LightBrush is null Drawing Bitmatrix to winform graphics. Draw background only for null matrix DarkBrush or LightBrush is null Saves QrCode Image to specified stream in the specified format Stream or Format is null The image was saved with the wrong image format You should avoid saving an image to the same stream that was used to construct. Doing so might damage the stream If any additional data has been written to the stream before saving the image, the image data in the stream will be corrupted Using MetaFile Class to create metafile. temp control create to use as object to get temp graphics for Hdc. Drawing on the metaGraphics will record as vector metaFile. DarkBrush for drawing Dark module of QrCode ISizeCalculation for the way to calculate QrCode's pixel size. Ex for ISizeCalculation:FixedCodeSize, FixedModuleSize Clear all pixel with given color. Must not be null, or pixel width, pixel height equal to zero Exception should be expect with null writeablebitmap or pixel width, height equal to zero. Draw rectangle with given color. Must not be null, or pixel width, pixel height equal to zero Exception should be expect with null writeablebitmap or pixel width, height equal to zero. Copies characters between buffers New buffer Buffer to copy from Number of character to copy Occure when ErrorCorrectLevel or Text changed QrCode matrix cache updated. Update Geometry if is unlocked. This method is use to update QuietZone after use method SetQuietZoneModule If Class is locked, it won't update Geometry or quietzone. Unlock class will cause class to update Geometry and quietZone. Get Qr SquareBitMatrix as two dimentional bool array. It will be deep copy of control's internal bitmatrix. null if matrix is null, else full matrix Return whether if class is locked Encode and Update bitmap when ErrorCorrectlevel or Text changed. If Class is locked, it won't update QrMatrix cache. Unlock class will cause class to update QrMatrix Cache and redraw bitmap. Freeze Class, Any value change to Brush, QuietZoneModule won't cause immediately redraw bitmap. Unfreeze and redraw immediately. QrCode matrix cache updated. Get Qr SquareBitMatrix as two dimentional bool array. It will be deep copy of control's internal bitmatrix. null if matrix is null, else full matrix Return whether if class is locked Return whether if class is freezed. GeneratedInternalTypeHelper CreateInstance GetPropertyValue SetPropertyValue CreateDelegate AddEventHandler