Merge branch 'master' into gh-pages

This commit is contained in:
javl
2018-01-14 17:18:31 +01:00
2 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -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).
+7 -5
View File
@@ -150,8 +150,8 @@
<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>
@@ -189,7 +189,7 @@
<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>
@@ -615,15 +615,17 @@
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(); };