Created
January 14, 2020 06:25
-
-
Save rozek/30fd9863b6b133105a934f87d01e73f8 to your computer and use it in GitHub Desktop.
Bangle.js: draws a previously transferred LenaImg file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Storage = require('Storage'); | |
Bangle.setLCDMode(); | |
g.clear(); | |
let ImageFile = Storage.open('LenaImg','r'); | |
for (let y = 0; y < 240; y++) { | |
let LineData = ImageFile.readLine(); | |
g.drawImage({ | |
width:240, height:1, bpp:16, transparent:0, | |
buffer:E.toArrayBuffer(atob(LineData)) | |
}, 0,y); | |
} | |
g.flip(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment