Merge branch 'master' into gh-pages

This commit is contained in:
javl
2018-10-08 14:51:13 +02:00
+6 -5
View File
@@ -778,11 +778,12 @@
} }
byteIndex--; byteIndex--;
// If we are at the last set, fill up our byte to 8 bits // if this was the last pixel of a row or the last pixel of the
if (index == imageData.data.length-4){ // image, fill up the rest of our byte with zeros so it always contains 8 bits
for(var i=byteIndex;i>-1;i--){ if ((index != 0 && (((index/4)+1)%(canvas.width)) == 0 ) || (index == imageData.data.length-4)) {
number += Math.pow(2, i); // for(var i=byteIndex;i>-1;i--){
} // number += Math.pow(2, i);
// }
byteIndex = -1; byteIndex = -1;
} }