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

Double the resolution using unicode #5

Closed
posva opened this issue Sep 27, 2015 · 5 comments
Closed

Double the resolution using unicode #5

posva opened this issue Sep 27, 2015 · 5 comments
Assignees

Comments

@posva
Copy link
Owner

posva commented Sep 27, 2015

By using the unicode character \u2580: ▀ and setting the background and the foreground colours, I can print two pixels in one space instead of one pixel in two spaces. This will double the resolution by printing twice as possible pixels given a certain width.

# use ^[[38;5;$colorindexm to change the foreground
# use ^[48;5;$colorindexm to change the background
printf '\033[38;5;1;48;5;2m\u2580\n'
@posva posva self-assigned this Sep 27, 2015
@posva posva closed this as completed in b188503 Oct 4, 2015
@tomswartz07
Copy link

Is there a way to make the higher resolution (e.g. running with the -r 2 flag) the default?

@posva
Copy link
Owner Author

posva commented Oct 16, 2015

@tomswartz07 That's actually the case 😕

@posva
Copy link
Owner Author

posva commented Oct 16, 2015

@tomswartz07 maybe you're looking at the script version instead of the C version
(sorry for the double notification)

@tomswartz07
Copy link

@posva no problem, thanks for the followup.

I'm running the compiled c version. Does that make any difference?

@posva
Copy link
Owner Author

posva commented Oct 17, 2015

@tomswartz07 there is a call to check for unicode support at https://github.com/posva/catimg/blob/master/src/catimg.c#L38

If the test fails, the lower resolution is used. If you support unicode but the test fail, I'll be grateful if you could find some way to check unicode support on your machine. BTW, can you tell me which terminal are you using and which os?

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

No branches or pull requests

2 participants