mirror of https://github.com/espruino/BangleApps
darken dithered osm images
parent
1dad92ae0b
commit
0662bb44f5
|
@ -8,7 +8,7 @@ Stick this in a file so we can
|
|||
function imageFilterFor3BPP(srcData, dstData, options) {
|
||||
options = options || {};
|
||||
if (options.colLo === undefined)
|
||||
options.colLo = 115; // when adding contrast/saturation, this is the max saturaton we add
|
||||
options.colLo = 140; // when adding contrast/saturation, this is the max saturaton we add
|
||||
if (options.colHi === undefined)
|
||||
options.colHi = 250;
|
||||
if (options.sharpen === undefined)
|
||||
|
@ -103,4 +103,4 @@ function imageFilterFor3BPP(srcData, dstData, options) {
|
|||
idx+=4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<input type="checkbox" id="finaldither" checked></input><span>Final dither (Bangle.js preview)</span><br/>
|
||||
<input type="checkbox" id="sharpen" checked></input><span>Sharpen</span>
|
||||
<input type="checkbox" id="dither"></input><span>Line Dither</span><br/>
|
||||
<input type="range" id="slider_lo" min="0" max="255" value="115">Lo threshold<br/>
|
||||
<input type="range" id="slider_lo" min="0" max="255" value="140">Lo threshold<br/>
|
||||
<input type="range" id="slider_hi" min="0" max="255" value="250">Hi threshold<br/>
|
||||
|
||||
<script src="../../../webtools/heatshrink.js"></script>
|
||||
|
@ -104,8 +104,8 @@
|
|||
}
|
||||
|
||||
document.getElementById("getmap").addEventListener("click", update);
|
||||
document.getElementById("slider_lo").addEventListener("mouseup",update);
|
||||
document.getElementById("slider_hi").addEventListener("mouseup",update);
|
||||
document.getElementById("slider_lo").addEventListener("change",update);
|
||||
document.getElementById("slider_hi").addEventListener("change",update);
|
||||
document.getElementById("finaldither").addEventListener("click",update);
|
||||
document.getElementById("sharpen").addEventListener("click",update);
|
||||
document.getElementById("dither").addEventListener("click",update);
|
||||
|
|
Loading…
Reference in New Issue