Skip to content

Commit

Permalink
darken dithered osm images
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Jun 30, 2023
1 parent 1dad92a commit 0662bb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/openstmap/imagefilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -103,4 +103,4 @@ function imageFilterFor3BPP(srcData, dstData, options) {
idx+=4;
}
}
}
}
6 changes: 3 additions & 3 deletions apps/openstmap/test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0662bb4

Please sign in to comment.