mirror of
https://github.com/javl/image2cpp.git
synced 2026-07-27 19:56:07 +00:00
Merge branch 'master' into gh-pages
This commit is contained in:
+6
-5
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user