Browse Source

On large images it made 6 by 6 squared grid output

By rendering whole webpages failed png images were rendered 6x6 squared
grids that made error image display messy.
pull/21/head
laurly 11 years ago
parent
commit
ccc823fd5f
  1. 14
      resemble.js

14
resemble.js

@ -344,21 +344,9 @@ URL: https://github.com/Huddle/Resemble.js
var mismatchCount = 0;
var time = Date.now();
var skip;
if( (width > 1200 || height > 1200) && ignoreAntialiasing){
skip = 6;
}
loop(height, width, function(verticalPos, horizontalPos){
if(skip){ // only skip if the image isn't small
if(verticalPos % skip === 0 || horizontalPos % skip === 0){
return;
}
}
var offset = (verticalPos*width + horizontalPos) * 4;
var pixel1 = getPixelInfo(data1, offset, 1);
var pixel2 = getPixelInfo(data2, offset, 2);

Loading…
Cancel
Save