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
What I'm trying to do is to view an image that's tall and thin, I want to render it with no height limits but also to not upscale to fit the terminal's width (but still downscale if necessary, keeping the aspect ratio).
According to the man pages, I have the impression that setting --size "$COLUMNS" --scale 1 I should achieve just that, but it just ingores --scale and upscales the image to the full width of the terminal.
Chafa is version 1.12.4
The text was updated successfully, but these errors were encountered:
You're right that this is confusing (and currently impossible to do). --size is supposed to be a simple way to force the image size, so it always wins. --size "$COLUMNS" is saying "make the image exactly $COLUMNS cols wide and as tall as it needs to be to maintain the aspect ratio".
We need to add a parameter (called either --term-size or --frame-size) to set "soft" maximum image dimensions. See #84 (comment).
You can sort of fake this by calling stty cols $COLUMNS rows 9999 first, but that's obviously not ideal :-)
Fixed by 9a27c89 (I ended up calling it --view-size, so --view-size "$COLUMNS" --scale 1 should work for your use case.
Tangentially there's also a new option --fit-width introduced by ba14f04 that allows for ~infinite height (but as the name implies, scales to fit the width).
What I'm trying to do is to view an image that's tall and thin, I want to render it with no height limits but also to not upscale to fit the terminal's width (but still downscale if necessary, keeping the aspect ratio).
According to the man pages, I have the impression that setting
--size "$COLUMNS" --scale 1
I should achieve just that, but it just ingores --scale and upscales the image to the full width of the terminal.Chafa is version 1.12.4
The text was updated successfully, but these errors were encountered: