Skip to content

Commit

Permalink
Merge pull request espruino#2358 from nxdefiant/gallery
Browse files Browse the repository at this point in the history
gallery: Do not invert image colors
  • Loading branch information
gfwilliams authored Dec 6, 2022
2 parents 04d9c6a + d06e4c5 commit 26522b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion apps/gallery/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
0.01: New app!
0.02: Submitted to app loader
0.02: Submitted to app loader
0.03: Do not invert colors
6 changes: 3 additions & 3 deletions apps/gallery/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function drawImage(fileName) {
Bangle.setLCDBrightness(1); // Full brightness

image = eval(storage.read(fileName)); // Sadly, the only reasonable way to do this
g.clear().reset().drawImage(image, 88, 88, { rotate: angle });
g.clear().reset().setBgColor(0).setColor("#fff").drawImage(image, 88, 88, { rotate: angle });
}

setWatch(info => {
Expand All @@ -44,9 +44,9 @@ setWatch(info => {
else angle = 0;
Bangle.buzz();

g.clear().reset().drawImage(image, 88, 88, { rotate: angle })
g.clear().reset().setBgColor(0).setColor("#fff").drawImage(image, 88, 88, { rotate: angle })
}
}, BTN1, { repeat: true });

// We don't load the widgets because there is no reasonable way to unload them
drawMenu();
drawMenu();
2 changes: 1 addition & 1 deletion apps/gallery/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "gallery",
"name": "Gallery",
"version": "0.02",
"version": "0.03",
"description": "A gallery that lets you view images uploaded with the IDE (see README)",
"readme": "README.md",
"icon": "icon.png",
Expand Down

0 comments on commit 26522b3

Please sign in to comment.