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

tmux show picture is blur #116

Closed
newyorkthink opened this issue Nov 23, 2022 · 11 comments
Closed

tmux show picture is blur #116

newyorkthink opened this issue Nov 23, 2022 · 11 comments

Comments

@newyorkthink
Copy link

image

i try use 256 ,not work

image

@newyorkthink
Copy link
Author

viu is too
atanunq/viu#106

@hpjansson
Copy link
Owner

Hi, thanks for filing the bug.

What you're seeing is artifacts in symbol mode, since we can only use two colors per cell. For some images you can get better results if you specify --color-extractor median. This should result in less blurring, but potentially more noise instead.

@newyorkthink
Copy link
Author

I issus tmux
tmux/tmux#3395

@hpjansson
Copy link
Owner

If the issue is that you're getting symbol mode in tmux, that's unfortunately due to tmux not supporting images. There's nothing we can do about that in Chafa, unfortunately.

There is a sixel-capable fork of tmux, maybe you'll have some luck with that: https://github.com/csdvrx/tmux

Then to get sixel output in Chafa, use chafa -f sixel.

@hpjansson
Copy link
Owner

@newyorkthink Ping -- did you manage to fix your issue?

@newyorkthink
Copy link
Author

I sorry , i have not time to find question. and not fix it

@newyorkthink
Copy link
Author

image

@newyorkthink
Copy link
Author

image

@hpjansson
Copy link
Owner

I see. I'm sorry, it's not possible to produce better quality inside tmux. This can only be improved in tmux itself. You must either avoid tmux or use a tmux fork with image support (for instance, the sixel-capable fork I linked to above).

I'll close this now. Feel free to reopen if the situation changes, or open another issue if you have other questions/bugs to report. Thanks.

@m040601
Copy link

m040601 commented Sep 3, 2023

Just to give my 2 cents feedback.

This is not a request, nor a demand for attention to this issue !

Just some curious fact to report.

I am a very big fan of chafa and I am perfectly satisfied with what it does and what it does not. I'm not a programmer, but I am well aware of all the constraints that tmux imposes

[hpjansson] said
...
I'm sorry, it's not possible to produce better quality inside tmux. This can only be improved in tmux itself. You must either avoid tmux or ...
....

And yet "timg" was in the same "situation" and they somehow "managed" to overcome this, hzeller/timg#95

That is "timg" inside tmux inside kitty can see perfect images.

timg --pixelation=kitty cruZ6cSl_o.jpg

This is working as on my Archlinux system,

$ timg --version

timg 1.5.2+  <https://timg.sh/>
Copyright (c) 2016..2023 Henner Zeller. This program is free software; license GPL 2.0.

Image decoding GraphicsMagick 1.3.41 (2023-08-12)
Openslide 3.4.1
Turbo JPEG
QOI image loading
swscale 7.1.100
Video decoding libav 60.3.100; avdevice 60.1.100
Half, quarter, iterm2, and kitty graphics output: timg builtin.
Libsixel version 1.10.3

Installed from here, https://aur.archlinux.org/packages/timg

$ kitty --version

kitty 0.29.2 created by Kovid Goyal

$ tmux -V

tmux 3.3a

But,

chafa -f kitty cruZ6cSl_o.jpg

fails (that is chafa running inside tmux inside kitty)

$ chafa --version

Chafa version 1.12.4

Loaders:  GIF ImageMagick JPEG PNG SVG TIFF WebP XWD
Features: mmx sse4.1 popcnt
Applying: mmx

Copyright (C) 2018-2022 Hans Petter Jansson et al.
Incl. libnsgif copyright (C) 2004 Richard Wilson, copyright (C) 2008 Sean Fox
Incl. LodePNG copyright (C) 2005-2018 Lode Vandevenne

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Another one that, just like chafa, doesnt manage to do it inside tmux is "viu" , atanunq/viu#104

@hpjansson
Copy link
Owner

@m040601 Looks like the feature was introduced some time after I closed this. We should be able to support it without too much trouble.

I'll open a new issue to track it - thanks for bringing it up!

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

3 participants