Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
javl committed Jan 14, 2018
2 parents 1b16820 + 105ddb0 commit 24e85b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ You can find a simple Arduino example sketch [over here](https://github.com/javl
I wrote the code with my 128x64 pixel monochrome OLED display in mind, but it should work with most similar displays. You might need to change some export settings; those are explained in the tool.

### Credit ###
Initial code by [javl](https://github.com/javl), with aditional code by [wiredolphin](https://github.com/wiredolphin). The example sketch was made by Adafruit.
Initial code by [javl](https://github.com/javl), with aditional code by [wiredolphin](https://github.com/wiredolphin) and [davidalim](https://github.com/davidalim). The example sketch was made by [Adafruit](https://github.com/adafruit).
12 changes: 7 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ <h2 class="sub-section-title">or</h2>
<h2 class="sub-section-title">1. Paste byte array</h2>
<textarea id="byte-input" class="byte-input"></textarea><br />
<div class="text-input-size">
<input type="text" id="text-input-width" class="size-input" value="128" /> x
<input type="text" id="text-input-height" class="size-input" value="64" /> px
<input type="number" min="0" id="text-input-width" class="size-input" value="128" /> x
<input type="number" min="0" id="text-input-height" class="size-input" value="64" /> px
</div>
<button onclick="handleTextInput('horizontal')">Read as horizontal</button>
<button onclick="handleTextInput('vertical')">Read as vertical</button>
Expand Down Expand Up @@ -189,7 +189,7 @@ <h2>2. Image Settings</h2>
<div class="table-row">
<div class="table-cell"><label>Brightness threshold: </label></div>
<div class="table-cell">
<input id="threshold" class="size-input" type="text" name="threshold" onchange="updateInteger('threshold')" value="128"/>
<input id="threshold" class="size-input" type="number" min="0" max="255" name="threshold" oninput="updateInteger('threshold')" value="128"/>
<div class="note"><i>0 - 255; pixels with brightness above become white, below become black.</i></div>
</div>
</div>
Expand Down Expand Up @@ -615,15 +615,17 @@ <h2>4. Output</h2>
imageEntry.setAttribute('data-img', file.name);

var w = document.createElement('input');
w.type = "text";
w.type = "number";
w.name = "width";
w.min = 0;
w.className = "size-input";
w.value = img.width;
w.oninput = function() { canvas.width = this.value; update(); };

var h = document.createElement('input');
h.type = "text";
h.type = "number";
h.name = "height";
h.min = 0;
h.className = "size-input";
h.value = img.height;
h.oninput = function() { canvas.height = this.value; update(); };
Expand Down

0 comments on commit 24e85b8

Please sign in to comment.