Browse Source

Corrected the getPixelInfo call in isAntialiased

pull/89/head
Chananya Freiman 8 years ago committed by GitHub
parent
commit
74d983cf26
  1. 5
      resemble.js

5
resemble.js

@ -285,7 +285,7 @@ URL: https://github.com/Huddle/Resemble.js
function isAntialiased(sourcePix, data, cacheSet, verticalPos, horizontalPos, width){
var offset;
var targetPix;
var targetPix = {r: 0, g: 0, b: 0, a: 0};
var distance = 1;
var i;
var j;
@ -303,9 +303,8 @@ URL: https://github.com/Huddle/Resemble.js
} else {
offset = ((verticalPos+j)*width + (horizontalPos+i)) * 4;
targetPix = getPixelInfo(data, offset, cacheSet);
if(targetPix === null){
if(!getPixelInfo(targetPix , data, offset, cacheSet)){
continue;
}

Loading…
Cancel
Save