Skip to content

Commit

Permalink
Merge branch 'master' of github.com:metafloor/zpl-image
Browse files Browse the repository at this point in the history
  • Loading branch information
metafloor committed Apr 1, 2022
2 parents 1a964de ecd98ca commit 5395ae8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zpl-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 35,8 @@ function imageToZ64(img, opts) {

cvs.width = img.width || img.offsetWidth;
cvs.height = img.height || img.offsetHeight;
ctx.drawImage(img, 0, 0);
ctx.imageSmoothingQuality = 'high'; // in case canvas needs to scale image
ctx.drawImage(img, 0, 0, cvs.width, cvs.height);

let pixels = ctx.getImageData(0, 0, cvs.width, cvs.height);
return rgbaToZ64(pixels.data, pixels.width, opts);
Expand Down

0 comments on commit 5395ae8

Please sign in to comment.