Skip to content

Commit

Permalink
Merge pull request #12 from rafagets/master
Browse files Browse the repository at this point in the history
Update declaring missing variables
  • Loading branch information
metafloor authored Jul 7, 2024
2 parents 491f4d6 + 487a161 commit 89543a2
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 @@ -299,6 +299,7 @@ function right(mono) {
// empty space around the edges of the image if !notrim.
function monochrome(rgba, width, height, black, notrim) {
// Convert black from percent to 0..255 value
let y = 0, x = 0;
black = 255 * black / 100;

let minx, maxx, miny, maxy;
Expand Down Expand Up @@ -425,7 +426,7 @@ function crc16(s) {
// This is not an accumlating crc routine. Normally, the acc is intialized to
// 0xffff then inverted on each call. We just start with 0.
let crc = 0;
let j, i;
let j, i, c;

for (i = 0; i < s.length; i++) {
c = s.charCodeAt(i);
Expand Down

0 comments on commit 89543a2

Please sign in to comment.