darken dithered osm images

pull/2853/head
Gordon Williams 2023-06-30 16:58:02 +01:00
parent 1dad92ae0b
commit 0662bb44f5
2 changed files with 5 additions and 5 deletions

View File

@ -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;
}
}
}
}

View File

@ -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);