jstkdng / ueberzugpp

Drop in replacement for ueberzug written in C++
GNU General Public License v3.0
711 stars 25 forks source link

sixel issue with PDF preview #25

Closed adetabrani closed 1 year ago

adetabrani commented 1 year ago

https://user-images.githubusercontent.com/47938004/232231898-ac3e83a9-fe1a-4dcd-97d0-789b4b286153.mp4

I'm having an issue with previewing PDFs using Sixel on LF (without Sixel it works fine), if in the directory there is no file in PDF format then it will work fine.

the image preview renders fine but it will overwrite with other images when viewing previews of other formats, and if you continue to force navigation for previews then the LF container will be overwritten by logs.

testing materials: TE = alacrritty (sixel version) utility = LF (sixel version)

here is my LF preview config

jstkdng commented 1 year ago

Thanks for pointing this out.

image

It's not really an issue with PDFs but really an issue with large (regarding height) images. It seems the cleanup doesn't work properly.

Regarding the last thing, that sometimes happens if you switch to another image before the previous one is done drawing. I've have tried to mitigate it in U++ side but it sometimes still happens. I have also tried to mitigate it on the file manager side, like refreshing the ncurses window after every draw, that helps with the issue. We'd need to open an issue with the lf or lf-sixel folks to implement that.

jstkdng commented 1 year ago

I've implemented some fixes but that problem with broken output might require help from the file manager's side.

adetabrani commented 1 year ago

Screenshot from 2023-04-16 13-53-28

thanks, it works very well. does U++ currently support wayland?

I tried it on wayland using sixel, but the preview results are blurry and the size isn't the same as when used on x11

jstkdng commented 1 year ago

U++ supports wayland for sixel and kitty, sixel is even supported by the linux tty (thanks to yaft). For x11 output only xwayland terminals are supported.

I think it looks blurry because your preview script is using chafa instead of U++.