diff --git a/index.css b/index.css index fb9cf5e..3c4c62d 100644 --- a/index.css +++ b/index.css @@ -77,3 +77,6 @@ canvas { visibility: visible; } +.center { + text-align: center; +} \ No newline at end of file diff --git a/index.html b/index.html index 5ba131e..a74bad4 100644 --- a/index.html +++ b/index.html @@ -13,30 +13,33 @@ - qr_image + QRImage
-

QR codes with images

+
+

QRImage

+
-

- A website to generate valid QR codes with images in the - background. -

+
+

QRImage is a web app to generate QR codes with images.

+
- +
+ - + +
-

+
@@ -45,11 +48,10 @@ editor as needed).

-
- - -
+
+ +
@@ -141,29 +143,35 @@
- +
+ +
-

+
- +
+ +
-

+
- +
+ +
-

+
diff --git a/index.js b/index.js index 6403903..421a042 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,9 @@ imageLoader.addEventListener("change", handleImage, false); var uploadCanvas = document.getElementById("imageCanvas"); var uploadContext = uploadCanvas.getContext("2d"); +uploadCanvas.width = 200; +uploadCanvas.height = 200; + img = false; function handleImage(e) { @@ -14,9 +17,7 @@ function handleImage(e) { reader.onload = function (event) { img = new Image(); img.onload = function () { - uploadCanvas.width = img.width; - uploadCanvas.height = img.height; - uploadContext.drawImage(img, 0, 0); + uploadContext.drawImage(img, 0, 0, 200, 200); }; img.src = event.target.result; };