mirror of
https://github.com/tsl0922/EPD-nRF5.git
synced 2025-12-13 16:48:13 +08:00
fix bwr display
This commit is contained in:
@@ -92,7 +92,7 @@ function canvas2bytes(canvas, type='bw') {
|
||||
if (type !== 'bwr') {
|
||||
buffer.push(imageData.data[index] > 0 && imageData.data[index+1] > 0 && imageData.data[index+2] > 0 ? 1 : 0);
|
||||
} else {
|
||||
buffer.push(imageData.data[index] > 0 && imageData.data[index+1] === 0 && imageData.data[index+2] === 0 ? 1 : 0);
|
||||
buffer.push(imageData.data[index] > 0 && imageData.data[index+1] === 0 && imageData.data[index+2] === 0 ? 0 : 1);
|
||||
}
|
||||
|
||||
if (buffer.length === 8) {
|
||||
|
||||
Reference in New Issue
Block a user