Skip to content
Discussion options

You must be logged in to vote

Alignment

Assuming the image is a dom element named "image"

image | focusPosition(0,0) | frame

would produce an image, in frame, scrolled so that (0,0) is visible.

Image

To increase your resolution by 2 (2 colors per cells), you can use a ftxui::Canvas:

/**
 * @brief Converts a raw RGB buffer into an FTXUI Canvas using Block characters.
 * * Note: Block characters (Quadrants) provide a virtual resolution of 2x2 per
 * terminal cell. This is half the vertical resolution of Braille (DrawPoint).
 * * @param rgb_data A vector containing pixels in R, G, B order.
 * @param width    The width of the source image.
 * @param height   The height of the source image.
 * @return Canvas  The populated…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@smcallis
Comment options

Answer selected by smcallis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants