2 ms·
You should allow the user to specify a pixel ratio that describes the width/height of each character of their terminal font. Otherwise, your images will be dist
by jitl 9y ago
You should allow the user to specify a pixel ratio that describes the width/height of each character of their terminal font. Otherwise, your images will be distorted, because your output pixels are not square.
Here's a screenshot demonstrating this issue, when converting a GIF to text in a terminal:
https://monosnap.com/file/HwrGbSHEwxWlTQCCeXyd9qcFxwL38V.png https://monosnap.com/file/HwrGbSHEwxWlTQCCeXyd9qcFxwL38V.png
On the left, the original image.
In the center, a ratio-perserved resized render in a terminal
On the left, a pixel-ratio aware resized render.
- LEGOlord208 9y agoI'll look into it, thanks! EDIT: Done :) https://github.com/legolord208/termplay/commit/2263a5c5e385cb9f6042eaab2c37722ae11582d1 https://github.com/legolord208/termplay/commit/2263a5c5e385c...