Commit f083c2c6 by doszhang

dos

parent b3f33a96
...@@ -222,13 +222,13 @@ $(document).ready(function () { ...@@ -222,13 +222,13 @@ $(document).ready(function () {
var uploadctx = uploadedImg.getContext('2d'); var uploadctx = uploadedImg.getContext('2d');
var scale = 1; var scale = 1;
if (width < height) { if (width < height) {
scale = 2000 / width; scale = 1000 / width;
} else { } else {
scale = 2000 / height; scale = 1000 / height;
} }
// uploadctx.scale(scale, scale); // uploadctx.scale(scale, scale);
uploadedImg.width = width; uploadedImg.width = 375 * 2;
uploadedImg.height = height; uploadedImg.height = 375 * 2;
uploadctx.translate(uploadedImg.width / 2, uploadedImg.height / 2); uploadctx.translate(uploadedImg.width / 2, uploadedImg.height / 2);
uploadctx.scale(scale, scale); uploadctx.scale(scale, scale);
uploadctx.rotate(Math.PI / 180 * rotation); uploadctx.rotate(Math.PI / 180 * rotation);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment