-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option for height offset fix #67 #68
base: master
Are you sure you want to change the base?
Conversation
maybe we could add something like this but I still think you should just pass the |
While it is totally possible to do so, one reason I really like catimg is that it resizes to my current terminal width. My prompt will always display after |
I'm still not sure this logic belongs inside catimg: # times 2 because of high resolution displaying
catimg -H $(( 2 * $(tput lines) - 2)) image.png If we add an option like this it should default to 1 as most prompts are 1 height but work with other prompts too. It should also have a long name option only. Let's give this more time. |
That does make sense, added
tbh, I was actually thinking about that but didn't add it since there was 1) no previous option as a long name and 2) didn't want to add any more processing than needed. |
in vertical scaling this accounts for used spaced in the terminal such as a prompt
most prompts are size 1
@posva any updates on this?
What we are suggesting is not exactly this. Imagine a case where I don't know if my picture is limited by my terminal width or my terminal height. If I specify an argument to Here is a showcase of what I mean: |
What would you suggest? Do you think |
@posva can you provide closure to this PR? |
I will take a look in a few weeks once I have the time |
Closing due to inactivity. |
I still haven't had the time but this is an interesting PR |
in vertical scaling this accounts for used spaced in the terminal such as a prompt
This is a bug fix that resolves the display of scaling to the max terminal height. In reality the prompt get shown immediately after the image is displayed in the buffer, resulting in a view of a cutoff image. Adding an offset (optional) allows for users to change the effective max terminal height which their image is scaled against to render the complete image in their currently open terminal window.
This also fixes jarring updates from gifs. As if the displayed gif is larger than the display buffer, the gif is not played out smoothly in the terminal. Adding this offset allows scaling of the gif to fit the displayed buffer (this includes the user shell prompt) to ensure the smooth playback of the gif.
This can be treated as a feature request, however it primarily solves a vertical scaling display bug.
fixes #67
this issue could also be fixed by #69
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
An alternative to
catimg
, chafa properly resolves this issue and scales according with user prompts. For a workaround and temporary solution, users can use chafa.