mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Augment compression quality for images
This commit is contained in:
parent
c4e3718c01
commit
0e936db771
@ -255,7 +255,7 @@ var app = new Vue({
|
|||||||
var ctx = canvas.getContext('2d');
|
var ctx = canvas.getContext('2d');
|
||||||
ctx.drawImage(img, 0, 0, width, height);
|
ctx.drawImage(img, 0, 0, width, height);
|
||||||
|
|
||||||
resolve(canvas.toDataURL('image/jpeg', 0.5));
|
resolve(canvas.toDataURL('image/jpeg', 0.7));
|
||||||
}
|
}
|
||||||
img.onerror = function (err) {
|
img.onerror = function (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
Loading…
Reference in New Issue
Block a user