3 ms·
For better quality and hi color support, check https://github.com/csdvrx/derasterize https://github.com/csdvrx/derasterize Example in Windows Terminal: https:/
by csdvrx 6y ago
For better quality and hi color support, check https://github.com/csdvrx/derasterize https://github.com/csdvrx/derasterize
Example in Windows Terminal:
https://user-images.githubusercontent.com/49044530/102044900-6ba3f880-3d9d-11eb-9c5e-4758e8b2cecf.png https://user-images.githubusercontent.com/49044530/102044900...
Details on how it works in https://github.com/microsoft/Terminal/issues/448#issuecomment-744192801 https://github.com/microsoft/Terminal/issues/448#issuecommen... , https://github.com/microsoft/Terminal/issues/448#issuecomment-744615862 https://github.com/microsoft/Terminal/issues/448#issuecommen... and https://github.com/microsoft/Terminal/issues/448#issuecomment-744742509 https://github.com/microsoft/Terminal/issues/448#issuecommen...
- fallat 6y agoWow! Very nice too! Is the main difference the size of the masks? Yours appear to be 8x4, and png2linetext uses 3x3. It would make sense that the output is higher resolution. Maybe we can do better with larger mask sizes? :D Of course derasterizer also gets more resolution through color, whereas png2linetext uses just black and white. Edit: Ah, I guess the magic here is `adjudicate`, which selects the closest match. Mine is very dumb in this regard, or I guess is "pre-matched" by me. Edit2: I'm going to see what happens with a larger mask! Edit3: Definitely getting some nicer lines but I lose all the details. I think a marching cubes-like algorithm could work really well here. Edit4: Based on your project I inferred that adding more matches seems to add more resolution and yeah, outputs are looking even nicer now. I updated the repo! I also used shapes which are less sharp rather than "perfect match".