From c9884357c98eb399ffcc942cf57701850c6a774c Mon Sep 17 00:00:00 2001 From: Chananya Freiman Date: Tue, 13 Dec 2016 13:21:32 +0200 Subject: [PATCH] Make loop() arguments match its signature. It was just weird. --- resemble.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resemble.js b/resemble.js index b497b81..31bdba3 100644 --- a/resemble.js +++ b/resemble.js @@ -113,7 +113,7 @@ URL: https://github.com/Huddle/Resemble.js var whiteTotal = 0; var blackTotal = 0; - loop(height, width, function(verticalPos, horizontalPos){ + loop(width, height, function(horizontalPos, verticalPos){ var offset = (verticalPos*width + horizontalPos) * 4; var red = sourceImageData[offset]; var green = sourceImageData[offset + 1]; @@ -412,7 +412,7 @@ URL: https://github.com/Huddle/Resemble.js var pixel1 = {r: 0, g: 0, b: 0, a: 0}; var pixel2 = { r: 0, g: 0, b: 0, a: 0 }; - loop(height, width, function(verticalPos, horizontalPos){ + loop(width, height, function(horizontalPos, verticalPos){ if(skip){ // only skip if the image isn't small if(verticalPos % skip === 0 || horizontalPos % skip === 0){