diff --git a/README.md b/README.md index 7619568..4560771 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Main Features - Reconstruct QR Code by drawing pixel by pixel - Decode and read unscannable QR Code - Save and load existing work for later use -- Import/export QR Code from/to Image file -- Currently support up to QR Code Version 9 (53x53) +- Import/export QR Code from/to Image file or Text file +- Currently support up to QR Code Version 40 (177x177) - Support both Error and Erasure Correction using universal Reed-Solomon decoder - Extract valuable information although from badly damaged QR Code - Simulate data unmasking for manual data analysis diff --git a/index.html b/index.html index bd4e16c..f19b7b4 100644 --- a/index.html +++ b/index.html @@ -176,7 +176,11 @@
- +
+ +

+ +

@@ -206,10 +210,13 @@
+
+ +
@@ -505,40 +512,40 @@
- -
+ +
-

Padding Bits Recovery

+

-
+
Error :
-
+
Bits before recovery :
- +
Bits after recovery :
- +
-
+
Warning :
Note : Recovered modules are marked with green color
- - + +
- +
@@ -553,6 +560,7 @@ + @@ -599,4 +607,4 @@ - \ No newline at end of file + diff --git a/js/main.js b/js/main.js index 412d66b..4dfd4a4 100644 --- a/js/main.js +++ b/js/main.js @@ -6,10 +6,12 @@ **************************************** */ -var APP_VERSION = '0.3.3'; +var APP_VERSION = '0.4.0'; var qr_version = 1; //Current QR version (1-9) var qr_pixel_size = 10; //Current view size of QR code (pixel per module) +var qr_pixel_size_togglesave = 10; //Last toggle view size of QR code (pixel per module) + var qr_size = 17+(qr_version*4); //Current size of QR code var qr_array = []; //Main array to store QR data @@ -24,6 +26,7 @@ var show_grey = true; //Show grey modules in Decode mode var extract_info_mode = false; //Is Extract QR Information active? var brute_force_mode = false; //Is Brute-force Format Info active? var analysis_mode = false; //Is Data Analysis tool active? +var masking_mode = false; //Is Masking active? var qr_temp_array = []; //Temporary variable to handle qr_array duplicates var qr_data_block = []; //Array to store data block in "Data Analysis tool" @@ -33,13 +36,24 @@ var is_data_module = []; //Store data that separate between data module a var history_array = []; //Store history information and its qr_array data var active_history = -1; //Current active history +const maxSupportedSize = 177; // max is 177 for v40 +const maxVersion = 40; // max is not 50 + /*** * * generate QR table based on qr_array * ***/ function generateTable(version){ - qr_array = JSON.parse(JSON.stringify(qr_templates[version-1])); + qr_array = JSON.parse(JSON.stringify(generate_qr(version))); + if (version > 9 && version <= 20){ + qr_pixel_size = 5; + } else if (version > 20 && version <=35){ + qr_pixel_size = 2; + } else if (version > 35 ){ + qr_pixel_size = 1; + } + changed_state = false; var element = ""; @@ -282,6 +296,71 @@ function getInfoBits(){ return result; } +/*** +* +* Load Waidotto QR text format +* https://github.com/waidotto/strong-qr-decoder +***/ +function loadTxt2Array(lines) { + let sz = lines.length; + + var data = []; + + for(let i=0;i ( x===1 ? '#' : ( x===0 ? '_' : ( show_grey ? '?' : '_' ) ) ) ).join(''); + console.log(line); + dump_qr += line + "\n" + } + + return dump_qr; + +} + /*** * * generate QR code made from canvas based on qr_array values @@ -289,17 +368,30 @@ function getInfoBits(){ ***/ function generateResult(){ - var c = document.getElementById("qr-result"); - var size = 17+(qr_version*4); - c.width = qr_pixel_size*size; + var c = document.getElementById("qr-result-canvas"); + var size = 17+(qr_version*4); + var ctx = c.getContext("2d"); + + c.width = qr_pixel_size*size; c.height = qr_pixel_size*size; - var ctx = c.getContext("2d"); - ctx.fillStyle = "#000"; - for(var i=0; i < qr_array.length; i++){ - for(var j=0; j < qr_array[i].length; j++){ - var x = qr_pixel_size*j; - var y = qr_pixel_size*i; + // add quiet zone border and white fill + c.width += (qr_pixel_size*4) * 2; + c.height += (qr_pixel_size*4) * 2; + ctx.fillStyle = "#fff"; + ctx.fillRect(0,0,c.width,c.height); + + ctx.fillStyle = "#000"; + + for(var i=0; i < qr_array.length; i++){ + for(var j=0; j < qr_array[i].length; j++){ + var x = qr_pixel_size*j; + var y = qr_pixel_size*i; + + //shift due to quiet zone + x += qr_pixel_size*4; + y += qr_pixel_size*4; + if(qr_array[i][j] == 1){ ctx.fillStyle = "#000"; ctx.fillRect(x,y,qr_pixel_size,qr_pixel_size); @@ -318,7 +410,13 @@ function generateResult(){ } } } - + + $("#qr-result-dump").attr('rows', qr_version*4 +17 ); + $("#qr-result-dump").attr('cols', qr_version*4 +17 ); + $("#qr-result-dump").css( 'font-family', 'Courier New'); + $("#qr-result-dump").css("font-size", "7px"); + $("#qr-result-dump").val( dumpQRArray() ); + $("#qr-result").show(); $("#qr-table").hide(); $("#qr-overlay").hide(); @@ -356,6 +454,12 @@ function toggleResult(){ $(".mode-indicator button").removeClass("active"); $("#mobile-decode-mode").addClass("active"); + //resize for decode ( minimum 2px module width needed for standard device decoding ) + qr_pixel_size_togglesave = qr_pixel_size; + if (qr_pixel_size == 1 ) { + $("#btn-size-plus").trigger("click"); + } + generateResult(); $("#btn-switch-mode").addClass("active"); $("#div-tool-work, #box-history").hide(); @@ -376,6 +480,18 @@ function toggleResult(){ $(".mode-indicator button").removeClass("active"); $("#mobile-editor-mode").addClass("active"); + //restore to previous encode mode pixel size + if (qr_pixel_size - qr_pixel_size_togglesave >= 0){ + for (i = qr_pixel_size - qr_pixel_size_togglesave ; i > 0 ; i-- ){ + $("#btn-size-min").trigger("click"); + } + } + else { + for (i = qr_pixel_size_togglesave - qr_pixel_size ; i > 0 ; i-- ){ + $("#btn-size-plus").trigger("click"); + } + } + $("#qr-result").hide(); $(".qr-tab").show(); $("#btn-switch-mode").removeClass("active"); @@ -571,7 +687,7 @@ function importFromImage(src, cb){ var qrArray = qRCodeMatrix.bits.bits; var size = qRCodeMatrix.bits.width; - if(size > 53){ + if(size > maxSupportedSize){ alert("QR version is unsupported"); return; } @@ -812,7 +928,7 @@ function bruteForceFormatInfo(){ qr_format_array = format_information_bits[i][j].split("").reverse(); saveInfoTable(qr_size); generateResult(); - var image = document.getElementById("qr-result").toDataURL(); + var image = document.getElementById("qr-result-canvas").toDataURL(); if(i == 3 && j == 7){ decodeFromBase64(image, function(data){ brute_result.push(data); @@ -869,19 +985,17 @@ function showMaskPatternArea(){ resize(qr_pixel_size); } -function recoverPadding(){ - var data_array = JSON.stringify(qr_array); - var result = recoverPaddingBits(JSON.parse(data_array)); - var warning = false; +function patchingRecovery(result){ + var warning = 0; $("#qr-dummy").html(""); - $("#div-pad-rec-warning, #div-pad-rec-error").hide(); - $("#div-pad-rec-data, #btn-pad-rec-apply").show() + $("#div-patch-rec-warning, #div-patch-rec-error").hide(); + $("#div-patch-rec-data, #btn-patch-rec-apply").show() if(typeof result == "string"){ - $("#div-pad-rec-error").show(); - $("#div-pad-rec-error textarea").val(result); - $("#div-pad-rec-warning, #div-pad-rec-data, #btn-pad-rec-apply").hide(); + $("#div-patch-rec-error").show(); + $("#div-patch-rec-error textarea").val(result); + $("#div-patch-rec-warning, #div-patch-rec-data, #btn-patch-rec-apply").hide(); return; } @@ -906,28 +1020,30 @@ function recoverPadding(){ } elem += ""; $("#qr-dummy").append(elem); + resize(qr_pixel_size); + } for(var i=0; i < result.after.length; i++){ if(result.before.charAt(i) != "?"){ if(result.after.charAt(i) != result.before.charAt(i)){ - warning = true; - break; + warning++; } } } if(warning){ - $("#div-pad-rec-warning").show(); - $("#div-pad-rec-warning textarea").val("There's one or more modules conflict with the already known module of original QR code. Correction may fail.") + $("#div-patch-rec-warning").show(); + $("#div-patch-rec-warning textarea").val("There's are " + warning +" modules conflict with the already known module of original QR code. Correction may fail.") } - $("#pad-rec-before").val(result.before); - $("#pad-rec-after").val(result.after); + $("#patch-rec-before").val(result.before); + $("#patch-rec-after").val(result.after); qr_temp_array = Array.prototype.slice.call(result.result_array); } + /*** * * Perform Reed-Solomon decode @@ -1381,6 +1497,36 @@ $(document).ready(function(){ } }) + $("#new-btn-import-txt").click(function(){ + $("#import-txt").click(); + return false; + }) + + $("#import-txt").change(function(){ + if(this.files && this.files[0]){ + var reader = new FileReader(); + + reader.onload = function (e) { + const file = e.target.result; + + const lines = file.split(/\r\n|\n/); + $("#hidden-txt").val(lines.join('\n')); + $("#div-new").hide(); + qr_size = lines[0].length; + qr_version = (qr_size-17)/4; + generateTable( qr_version ); + data = loadTxt2Array(lines); + updateQRArray(data); + clearHistory(); + updateHistory("Load from image"); + refreshTable(); + changed_state = true; + + }; + reader.readAsText(this.files[0]); + } + }) + $("#menu-new").click(function(){ if(changed_state){ if(!confirm("Are you sure want to proceed?\nYour unsaved progress will be lost!")) @@ -1462,7 +1608,7 @@ $(document).ready(function(){ $("#btn-version-plus").click(function(){ if(changed_state){ if(confirm("Are you sure want to proceed?\nYour unsaved progress will be lost!")){ - if(qr_version != 9){ + if(qr_version != maxVersion){ qr_version += 1; qr_size = 17+(qr_version*4); $("#qr-version").val(qr_size+"x"+qr_size+" (ver. "+qr_version+")"); @@ -1470,7 +1616,7 @@ $(document).ready(function(){ } } } else { - if(qr_version != 9){ + if(qr_version != maxVersion){ qr_version += 1; qr_size = 17+(qr_version*4); $("#qr-version").val(qr_size+"x"+qr_size+" (ver. "+qr_version+")"); @@ -1543,12 +1689,14 @@ $(document).ready(function(){ $("#div-brute-force-loader").show(); bruteForceFormatInfo(); } else { - var image = document.getElementById("qr-result").toDataURL(); + var image = document.getElementById("qr-result-canvas").toDataURL(); $("#decode-message").val(""); $("#div-decode").show(); decodeFromBase64(image, function(decodedData){ if(decodedData != "error decoding QR Code"){ $("#decode-message").val(decodedData); + //resize for text based on QR version + $("#decode-message").css("height", (17+4*qr_version)*3+"px"); } }); } @@ -1724,6 +1872,16 @@ $(document).ready(function(){ maskDataBits(); $("#div-data-masking").hide(); + + //masking toogle visual + if($("#tools-masking").hasClass("active")){ + masking_mode = false; + $("#tools-masking").removeClass("active"); + } else { + masking_mode = true; + $("#tools-masking").addClass("active"); + } + }) $("#btn-mask-show-pattern-area").click(function(){ @@ -1742,21 +1900,23 @@ $(document).ready(function(){ ****************************/ $("#tools-pad-recovery").click(function(){ - recoverPadding(); - $("#div-padding-recovery").show(); + patchingRecovery(recoverPaddingBits(JSON.parse(JSON.stringify(qr_array)))); + $("#div-patching-recovery-title").text("Padding Bits Recovery"); + $("#div-patching-recovery").show(); + $("#div-tools").hide(); }) - $("#btn-pad-rec-apply").click(function(){ + $("#btn-patch-rec-apply").click(function(){ qr_array = JSON.parse(JSON.stringify(qr_temp_array)); refreshTable(); - updateHistory("Padding bits recovery"); - $("#div-padding-recovery").hide(); + updateHistory( $("#div-patching-recovery-title").text() ); + $("#div-patching-recovery").hide(); changed_state = true; }) - $("#btn-pad-rec-cancel").click(function(){ - $("#div-padding-recovery").hide(); + $("#btn-patch-rec-cancel").click(function(){ + $("#div-patching-recovery").hide(); }) /**************************** @@ -2285,4 +2445,4 @@ $(document).ready(function(){ return "Do you really want to close? Your unsaved progress will be lost!"; }; -}) \ No newline at end of file +}) diff --git a/js/qr.js b/js/qr.js new file mode 100644 index 0000000..b2bcb7c --- /dev/null +++ b/js/qr.js @@ -0,0 +1,183 @@ +const WHITE_COLOR = 0; +const BLACK_COLOR = 1; +const RED_COLOR = 3; +const GREY_COLOR = -1; + +/* + A finder is defined by 3 squares: + - A black 7x7 square + - A white 5x5 square + - A black 3x3 square + + Padding is denoted by a 9x9 square surrounding the element + and being cropped on its corners. + + x and y denote the (x,y) coordinate of the 7x7 square, taken + at the top left corner +*/ + +function draw_square(t, x, y, size, color){ + for(let i=x; i= t.length || i < 0){ + continue + } + if(j >= t.length || j < 0) { + continue + } + t[i][j] = color; + } + } +} + +function generate_finder_separator(t, x, y) { + return draw_square(t, x - 1, y - 1, 9, WHITE_COLOR); +} + +function generate_finder(t, x, y){ + generate_finder_separator(t, x, y); + draw_square(t, x, y, 7, BLACK_COLOR); + draw_square(t, x + 1, y + 1, 5, WHITE_COLOR); + draw_square(t, x + 2, y + 2, 3, BLACK_COLOR); +} + +/* + The timing patterns is a pattern of black / white squares (1x1) that + begin with a black one and move either horizontally or vertically, + connecting the finders separators. +*/ +function generate_timing_pattern_v(t, xStart, yStart, yEnd){ + // Start with black + let current = BLACK_COLOR; + for(let j=yStart; j<=yEnd; j++){ + t[xStart][j] = current; + current = (current == BLACK_COLOR ? WHITE_COLOR : BLACK_COLOR) + } +} + +function generate_timing_pattern_h(t, xStart, yStart, xEnd){ + // Start with black + let current = BLACK_COLOR; + for(let i=xStart; i<=xEnd; i++){ + t[i][yStart] = current; + current = (current == BLACK_COLOR ? WHITE_COLOR : BLACK_COLOR) + } +} + + +let versions_size = []; +for(let i=0;i<40;i++){ + versions_size.push( + [21 + i*4, 21 + i*4] + ) +} + +/* + Alignment patterns are boxes sized 5x5 that are + formed as follows: + + - Outer 5x5 black square + - Inner 3x3 white square + - Inner-most 1x1 black square + + The coordinates from alignment_pattern_array (file: table.js) refer to the center + of the alignment pattern (the 1x1 square). +*/ + +function add_alignment_patterns(t, index){ + let alignment = alignment_pattern_array[index]; + if(alignment.length == 0){ + return; + } + + let alignment_locs = []; + + for(let i=0; i t.length - 8 && t_y < 8) { + continue + } + + if(l_x < 8 && t_y < 8) { + continue; + } + + if(l_x < 8 && b_y > t.length - 8){ + continue + } + + draw_square(t, x-2, y-2, 5, BLACK_COLOR); + draw_square(t, x-1, y-1, 3, WHITE_COLOR); + draw_square(t, x, y, 1, BLACK_COLOR); + + + } + console.log(alignment_locs); +} + +// use table.js Array version_information_table ( left most bit is still position 17 ) +function add_version_info(t, version){ + if (version >= 7) { + for (step=0 ; step < 3 ; step++ ){ + x=0; + for(let i = 17 - step; i>=0 ; i -= 3){ + // Bottom Left + draw_square(t, 4*version + 6 + step, x ,1, BLACK_COLOR * parseInt(version_information_table[version - 7].toString().split("")[i])); + // Top Right + draw_square(t, x, 4*version + 6 + step ,1, BLACK_COLOR * parseInt(version_information_table[version - 7].toString().split("")[i])); + + x++; + } + } + } + return t; +} + +// https://www.thonky.com/qr-code-tutorial/format-version-information +function add_dark_module(t, version){ + //dark module is always (8, 4*version + 9) + draw_square(t, 4*version + 9, 8 ,1, BLACK_COLOR); + return t; +} + + + +function generate_qr(version){ + console.log(`Generating ${version}`) + let t = []; + let sizes = versions_size[version-1]; + let x_max = sizes[0]; + let y_max = sizes[1]; + + for(let i = 0; i 9 && version <= 26 ){ + length_indicator = 12; + } else if ( version > 26 ){ + length_indicator = 14; + } + + if(data_bits.substring(4,4+length_indicator).search(/\?/g) != -1) return "ERROR: Unknown Character Count Indicator"; - var character_count = parseInt(data_bits.substring(4,14), 2); + var character_count = parseInt(data_bits.substring(4,4+length_indicator), 2); if(character_count % 3 == 0){ var offset = (character_count/3)*10; } else if(character_count % 3 == 1) { @@ -442,28 +449,38 @@ function recoverPaddingBits(data_array){ var offset = ((character_count-1)/3)*10; offset += 4; } - offset += 14; + offset += 4+length_indicator; } else if(encoding_mode == "0010"){ - if(data_bits.substring(4,13).search(/\?/g) != -1) + var length_indicator = 9; + if ( version > 9 && version <= 26 ){ + length_indicator = 11; + } else if ( version > 26 ){ + length_indicator = 13; + } + if(data_bits.substring(4,4+length_indicator).search(/\?/g) != -1) return "ERROR: Unknown Character Count Indicator"; - var character_count = parseInt(data_bits.substring(4,13), 2); + var character_count = parseInt(data_bits.substring(4,4+length_indicator), 2); if(character_count % 2 == 0){ var offset = (character_count/2)*11; } else { var offset = ((character_count-1)/2)*11; offset += 6; } - offset += 13; + offset += 4+length_indicator; } else if(encoding_mode == "0100"){ - if(data_bits.substring(4,12).search(/\?/g) != -1) + var length_indicator = 8; + if ( version > 9 ){ + length_indicator = 16; + } + if(data_bits.substring(4,4+length_indicator).search(/\?/g) != -1) return "ERROR: Unknown Character Count Indicator"; - var character_count = parseInt(data_bits.substring(4,12), 2); + var character_count = parseInt(data_bits.substring(4,4+length_indicator), 2); var offset = character_count*8; - offset += 12; + offset += 4+length_indicator; } else if(encoding_mode == "1000"){ if(data_bits.substring(4,12).search(/\?/g) != -1) @@ -870,6 +887,12 @@ function QRDecode(data){ if(mode == 0b0001){ var length_indicator = 10; + if ( version > 9 && version <= 26 ){ + length_indicator = 12; + } else if ( version > 26 ){ + length_indicator = 14; + } + var num = ""; length = parseInt(data_bits.substring(0, length_indicator), 2); temp_data += "["+data_bits.substring(0, length_indicator)+"] ["; @@ -908,6 +931,12 @@ function QRDecode(data){ } else if(mode == 0b0010){ var length_indicator = 9; + if ( version > 9 && version <= 26 ){ + length_indicator = 11; + } else if ( version > 26 ){ + length_indicator = 13; + } + var current_data = ""; length = parseInt(data_bits.substring(0, length_indicator), 2); temp_data += "["+data_bits.substring(0, length_indicator)+"] ["; @@ -950,6 +979,10 @@ function QRDecode(data){ } else if(mode == 0b0100){ var length_indicator = 8; + if ( version > 9 ){ + length_indicator = 16; + } + var current_data = ""; length = parseInt(data_bits.substring(0, length_indicator), 2); temp_data += "["+data_bits.substring(0, length_indicator)+"] ["; @@ -1117,6 +1150,12 @@ function readDataBits(data_bits){ if(mode == 0b0001){ var length_indicator = 10; + if ( qr_version > 9 && qr_version <= 26 ){ + length_indicator = 12; + } else if ( qr_version > 26 ){ + length_indicator = 14; + } + var num = ""; length = parseInt(data_bits.substring(0, length_indicator), 2); temp_data += "["+data_bits.substring(0, length_indicator)+"] ["; @@ -1152,6 +1191,12 @@ function readDataBits(data_bits){ } else if(mode == 0b0010){ var length_indicator = 9; + if ( qr_version > 9 && qr_version <= 26 ){ + length_indicator = 11; + } else if ( qr_version > 26 ){ + length_indicator = 13; + } + var current_data = ""; length = parseInt(data_bits.substring(0, length_indicator), 2); temp_data += "["+data_bits.substring(0, length_indicator)+"] ["; @@ -1190,6 +1235,10 @@ function readDataBits(data_bits){ } else if(mode == 0b0100){ var length_indicator = 8; + if ( qr_version > 9 ){ + length_indicator = 16; + } + var current_data = ""; length = parseInt(data_bits.substring(0, length_indicator), 2); temp_data += "["+data_bits.substring(0, length_indicator)+"] ["; @@ -1232,4 +1281,4 @@ function readDataBits(data_bits){ } return data.join(""); -} \ No newline at end of file +} diff --git a/js/table.js b/js/table.js index 4d2cb5e..8a7f8ee 100644 --- a/js/table.js +++ b/js/table.js @@ -48,15 +48,46 @@ var function_pattern_with_format_info = { var alignment_pattern_array = [ - [], - [6, 18], - [6, 22], - [6, 26], - [6, 30], - [6, 34], - [6, 22, 38], - [6, 24, 42], - [6, 26, 46] + [], //1 + [6, 18], //2 + [6, 22], //3 + [6, 26], //4 + [6, 30], //5 + [6, 34], //6 + [6, 22, 38], //7 + [6, 24, 42], //8 + [6, 26, 46], //9 + [6, 28, 50], //10 + [6, 30, 54], //11 + [6, 32, 58], //12 + [6, 34, 62], //13 + [6, 26, 46, 66], //14 + [6, 26, 48, 70], //15 + [6, 26, 50, 74], //16 + [6, 30, 54, 78], //17 + [6, 30, 56, 82], //18 + [6, 30, 58, 86], //19 + [6, 34, 62, 90], //20 + [6, 28, 50, 72, 94], //21 + [6, 26, 50, 74, 98], //22 + [6, 30, 54, 78, 102], //23 + [6, 28, 54, 80, 106], //24 + [6, 32, 58, 84, 110], //25 + [6, 30, 58, 86, 114], //26 + [6, 34, 62, 90, 118], //27 + [6, 26, 50, 74, 98, 122], //28 + [6, 30, 54, 78, 102, 126], //29 + [6, 26, 52, 78, 104, 130], //30 + [6, 30, 56, 82, 108, 134], //31 + [6, 34, 60, 86, 112, 138], //32 + [6, 30, 58, 86, 114, 142], //33 + [6, 34, 62, 90, 118, 146], //34 + [6, 30, 54, 78, 102, 126, 150], //35 + [6, 24, 50, 76, 102, 128, 154], //36 + [6, 28, 54, 80, 106, 132, 158], //37 + [6, 32, 58, 84, 110, 136, 162], //38 + [6, 26, 54, 82, 110, 138, 166], //39 + [6, 30, 58, 86, 114, 142, 170] //40 ]; var format_information_bits_raw = { @@ -229,37 +260,191 @@ var format_information_unmask = [ '111111111111111' ]; + +/* https://www.thonky.com/qr-code-tutorial/format-version-tables */ //Version information table for QR version 7 and higher var version_information_table = [ - 000111110010010100, - 001000010110111100, - 001001101010011001 -] + "000111110010010100", //7 + "001000010110111100", //8 + "001001101010011001", //9 + "001010010011010011", //10 + "001011101111110110", //11 + "001100011101100010", //12 + "001101100001000111", //13 + "001110011000001101", //14 + "001111100100101000", //15 + "010000101101111000", //16 + "010001010001011101", //17 + "010010101000010111", //18 + "010011010100110010", //19 + "010100100110100110", //20 + "010101011010000011", //21 + "010110100011001001", //22 + "010111011111101100", //23 + "011000111011000100", //24 + "011001000111100001", //25 + "011010111110101011", //26 + "011011000010001110", //27 + "011100110000011010", //28 + "011101001100111111", //29 + "011110110101110101", //30 + "011111001001010000", //31 + "100000100111010101", //32 + "100001011011110000", //33 + "100010100010111010", //34 + "100011011110011111", //35 + "100100101100001011", //36 + "100101010000101110", //37 + "100110101001100100", //38 + "100111010101000001", //39 + "101000110001101001" //40 +]; + + +/* https://www.thonky.com/qr-code-tutorial/format-version-information */ +// L = 1 +// M = 0 +// Q = 3 +// H = 2 + + +/* M L H Q https://www.thonky.com/qr-code-tutorial/error-correction-table adding code block 1 and 2 */ var data_code_num_table = [ - [ 16, 19, 9, 13], - [ 28, 34, 16, 22], - [ 44, 55, 26, 34], - [ 64, 80, 36, 48], - [ 86, 108, 46, 62], - [ 108, 136, 60, 76], - [ 124, 156, 66, 88], - [ 154, 194, 86, 110], - [ 182, 232, 100, 132] + [ 16, 19, 9, 13], //1 + [ 28, 34, 16, 22], //2 + [ 44, 55, 26, 34], //3 + [ 64, 80, 36, 48], //4 + [ 86, 108, 46, 62], //5 + [ 108, 136, 60, 76], //6 + [ 124, 156, 66, 88], //7 + [ 154, 194, 86, 110], //8 + [ 182, 232, 100, 132], //9 + [ 216, 274, 122, 154], //10 + [ 254, 324, 140, 180], //11 + [ 290, 370, 158, 206], //12 + [ 334, 428, 180, 244], //13 + [ 365, 461, 197, 261], //14 + [ 415, 523, 223, 295], //15 + [ 453, 589, 253, 325], //16 + [ 507, 647, 283, 367], //17 + [ 563, 721, 313, 397], //18 + [ 627, 795, 341, 445], //19 + [ 669, 861, 385, 485], //20 + [ 714, 932, 406, 512], //21 + [ 782, 1006, 442, 568], //22 + [ 860, 1094, 464, 614], //23 + [ 914, 1174, 514, 664], //24 + [1000, 1276, 538, 718], //25 + [1062, 1370, 596, 754], //26 + [1128, 1468, 628, 808], //27 + [1193, 1531, 661, 871], //28 + [1267, 1631, 701, 911], //29 + [1373, 1735, 745, 985], //30 + [1455, 1843, 793, 1033], //31 + [1541, 1955, 845, 1115], //32 + [1631, 2071, 901, 1171], //33 + [1725, 2191, 961, 1231], //34 + [1812, 2306, 986, 1286], //35 + [1914, 2434, 1054, 1354], //36 + [1992, 2566, 1096, 1426], //37 + [2102, 2702, 1142, 1502], //38 + [2216, 2812, 1222, 1582], //39 + [2334, 2956, 1276, 1666] //40 + ]; +/* M L H Q https://www.thonky.com/qr-code-tutorial/error-correction-table adding code block 1 and 2 */ var RS_block_num_table = [ - [1, 1, 1, 1], - [1, 1, 1, 1], - [1, 1, 2, 2], - [2, 1, 4, 2], - [2, 1, 4, 4], - [4, 2, 4, 4], - [4, 2, 5, 6], - [4, 2, 6, 6], - [5, 2, 8, 8] + [1, 1, 1, 1], //1 + [1, 1, 1, 1], //2 + [1, 1, 2, 2], //3 + [2, 1, 4, 2], //4 + [2, 1, 4, 4], //5 + [4, 2, 4, 4], //6 + [4, 2, 5, 6], //7 + [4, 2, 6, 6], //8 + [5, 2, 8, 8], //9 + [5, 4, 8, 8], //10 + [5, 4, 11,8], //11 + [8, 4, 11,10], //12 + [9, 4, 16,12], //13 + [9, 4, 16,16], //14 + [10,6, 18,12], //15 + [10,6, 16,17], //16 + [11,6, 19,16], //17 + [13, 6, 21, 18], //18 + [14, 7, 25, 21], //19 + [16, 8, 25, 20], //20 + [17, 8, 25, 23], //21 + [17, 9, 34, 23], //22 + [18, 9, 30, 25], //23 + [20, 10, 32, 27], //24 + [21, 12, 35, 29], //25 + [23, 12, 37, 34], //26 + [25, 12, 40, 34], //27 + [26, 13, 42, 35], //28 + [28, 14, 45, 38], //29 + [29, 15, 48, 40], //30 + [31, 16, 51, 43], //31 + [33, 17, 54, 45], //32 + [35, 18, 57, 48], //33 + [37, 19, 60, 51], //34 + [38, 19, 63, 53], //35 + [40, 20, 66, 56], //36 + [43, 21, 70, 59], //37 + [45, 22, 74, 62], //38 + [47, 24, 77, 65], //39 + [49, 25, 81, 68] //40 ]; +/* M L H Q https://www.thonky.com/qr-code-tutorial/error-correction-table adding code block 1 and 2 */ +var error_correction_code_table = [ + [10, 7,17,13], //1 + [16,10,28,22], //2 + [26,15,22,18], //3 + [18,20,16,26], //4 + [24,26,22,18], //5 + [16,18,28,24], //6 + [18,20,26,18], //7 + [22,24,26,22], //8 + [22,30,24,20], //9 + [26,18,28,24], //10 + [30,20,24,28], //11 + [22,24,28,26], //12 + [22,26,22,24], //13 + [24,30,24,20], //14 + [24,22,24,30], //15 + [28,24,30,24], //16 + [28,28,28,28], //17 + [26,30,28,28], //18 + [26,28,26,26], //19 + [26,28,28,30], //20 + [26,28,30,28], //21 + [28,28,24,30], //22 + [28,30,30,30], //23 + [28,30,30,30], //24 + [28,26,30,30], //25 + [28,28,30,28], //26 + [28,30,30,30], //27 + [28,30,30,30], //28 + [28,30,30,30], //29 + [28,30,30,30], //30 + [28,30,30,30], //31 + [28,30,30,30], //32 + [28,30,30,30], //33 + [28,30,30,30], //34 + [28,30,30,30], //35 + [28,30,30,30], //36 + [28,30,30,30], //37 + [28,30,30,30], //38 + [28,30,30,30], //39 + [28,30,30,30] //40 + +]; + + + var alphanumeric_table = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", @@ -271,414 +456,11 @@ var alphanumeric_table = [ ".", "/", ":" ]; -var error_correction_code_table = [ - [10,7,17,13], - [16,10,28,22], - [26,15,22,18], - [18,20,16,26], - [24,26,22,18], - [16,18,28,24], - [18,20,26,18], - [22,24,26,22], - [22,30,24,20] -]; +/* + https://www.thonky.com/qr-code-tutorial/structure-final-message + up to QR version 40 -var remainder_bits_table = [0,7,7,7,7,7,0,0,0]; + 1 2 3 4 5 6 7 8 910111213141516171819202122232425262728293031323334353637383940 */ +var remainder_bits_table = [0,7,7,7,7,7,0,0,0,0,0,0,0,3,3,3,3,3,3,3,4,4,4,4,4,4,4,3,3,3,3,3,3,3,0,0,0,0,0,0]; -/************************************************************ - Pre-defined QR matri-1 template for faster computing - - 0 : white - 1 : black - -1 : grey (data modules) - -*************************************************************/ -var qr_templates = [ - [ - /**************** - VERSION 1 - ****************/ - [1,1,1,1,1,1,1,0,0,-1,-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