Skip to content
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

Fix #1: Allow easier specification of output size #22

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

liquidcake1
Copy link

Turned out to be a bit of an epic. I'm not sure of behaviour in other terminals, but I've tested this in Konsole.

Fixes #1

@liquidcake1
Copy link
Author

Tested with:

for dims in "50x20" "200x20" "400x20"; do
  convert -size "$dims" xc:white white.png
  for args in "" "--width=100%" "--width=original" "--width=100% --height=auto" "--width=100% --height=default" "--width=auto --height=original"; do
    echo "$dims $args"
    python3 -m imgcat white.png $args
  done
done

ss1

ss2

ss3

As you can see, default (ie. not passing the argument) appears to be the same as auto, though this isn't actually documented on the protocol page I found. Resizing my terminal to be small in the vertical axis and fiddling appropriately with the parameters got a broadly similar behaviour, but one which is harder to screenshot.

@wookayin wookayin self-assigned this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[suggest] add a option to output original size
2 participants