summaryrefslogtreecommitdiff
path: root/index.html
blob: fe4d3f8ec3074531a80aa6651a13dc1ee2621820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
	<title>QRDraw</title>
  <link rel="stylesheet" href="style.css">
<!--
based on this jsfiddle.net/lachlan/r8qWV/
more info http://vecg.cs.ucl.ac.uk/Projects/SmartGeometry/halftone_QR/halftoneQR_sigga13.html
-->
</head>
<body>
  <br />
  <br />
  Content of QR code:<br />
  <textarea id="input" cols="50" rows="5" placeholder="Enter text or a URL"></textarea><br />
  QR size:
  <select id="size">
    <option value="0">Auto</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    <option value="6" selected>6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option value="9">9</option>
    <option value="10">10</option>
  </select>
  Load image: <input type="file" id="file_upload" />
  <br />
  <br />

  <div class='box'>
    <canvas id="imageColour"></canvas>
    <canvas id="imagePixel"></canvas>
    <canvas id="imageThreshold"></canvas>
    <br><small>Draw here &uarr;</small>
  </div>
  <div class='box'>
    <canvas id="output"></canvas>
    <br><small>Your QR Code</small>
  </div>
  <br>
  <br>
  <canvas id="brush"></canvas> <small>brush (push up/down to resize, x to change color)</small>
  <br>
  <br>
  <a id="download" href="about:blank" download="qr.png" target="_blank" title="Download QR Code">Download QR Code</a><br />
  <script src="jquery-2.1.1.js"></script>
  <script src='qrcode.js'></script>
  <script src='halftoneqr.js'></script>
  <script src='draw.js'></script>
</body>
</html>