You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to find a reliable way to display 3 images side by side (horizontal grid) - they are all of the same size / aspect-ratio.
When the pixel mode is SYMBOLS (which seems to be the default that's decided by detect_capabilities() on my mac, both in VS Code (integrated terminal) and iTerm2 (not quite sure why it doesn't detect support for iTerm2 protocol), that's easy enough as I can extract the lines from the canvas, concatenate them, and print them line by line.
However when I force ITERM2 pixel format, that obviously cannot work.
I resulted to write some really clunky code that uses ANSI codes to move the cursor back up after printing each image, which kinda works.
However, I'd like to find a way to automatically determine:
What pixel mode was used
On that basis, determine what mechanism to use to place the images side by side
And in particular, determine how many up-cursor characters to print to get to the top of the previous image.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm trying to find a reliable way to display 3 images side by side (horizontal grid) - they are all of the same size / aspect-ratio.
When the pixel mode is SYMBOLS (which seems to be the default that's decided by detect_capabilities() on my mac, both in VS Code (integrated terminal) and iTerm2 (not quite sure why it doesn't detect support for iTerm2 protocol), that's easy enough as I can extract the lines from the canvas, concatenate them, and print them line by line.
However when I force ITERM2 pixel format, that obviously cannot work.
I resulted to write some really clunky code that uses ANSI codes to move the cursor back up after printing each image, which kinda works.
However, I'd like to find a way to automatically determine:
Any suggestion?
Beta Was this translation helpful? Give feedback.
All reactions