stefanhaustein / TerminalImageViewer

Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode block graphics characters
Other
1.56k stars 111 forks source link

Add black rectangle u+25ac #108

Open clort81 opened 2 years ago

clort81 commented 2 years ago

While not strictly a 'block drawing character', the 'black rectangle u+25ac is a nice addition to thin and thick horizontal lines. ▬ ... ─ ━   I added to tiv.cpp 0x00fff000, 0x25ac, // Black rectangle < Clort > 0x00ffff00, 0x25ac, // Black rectangle < Clort > 0x000fff00, 0x25ac, // Black rectangle < Clort > (the extra matches allow it to 'hit' more of those middle lines)

stefanhaustein commented 2 years ago

I wonder if we should auto-generate extra matches for some characters by shifting by one pixel in configurable directions...

That said, I had thin lines enabled before and they often look quite out of place, as they show more fine-grained structure that isn't available elsewhere...

clort81 commented 2 years ago

i prefer to disable thin lines also ╷ ─ ┏ don't work well imo.

to get nice results I usually use the 'warp' tool in GIMP to shift regions so they align well.

I'd like to experiment with a random-shifter-of-source-image regions, and some Neural Network on the backend, scoring/judging how true to ground truth the result scores.