jstkdng/ueberzugpp

Multiple image support

3rd opened this issue · 15 comments

3rd commented

Hey, I'm working on a way to add image support to Neovim, so I picked ueberzugpp as the starting rendering backend and got a nice first version working.

I noticed that there is no multiple image support, and the image identifiers are not really used, when adding an image the canvas is cleared and only that image is rendered, and clear clears everything.

Is multiple image support on the roadmap?

It works great otherwise, and the tmux integration is amazing.
It does crash when sending multiple commands quickly, but that's workable.

Thanks!

Hello, I do have that in the roadmap, but it requires some restructuring of my code so it will take some time. Are you doing like a collage?

It does crash when sending multiple commands quickly, but that's workable.

really? rip

3rd commented

Ah, awesome!
Not a collage, but trying to render images for document grammars like Markdown.
I might have to write a small "compositor" to manage the images, maybe I could then always spit out a single image, but I was trying to avoid the tmux handling.
Thanks for the project!

image

Nice, though, multiple images won't work with everything. Probably only x11, iterm2 and maybe wayland.

hey, I have a working multiple image implementation for X11 on the refactor1 branch, give it a try.

3rd commented

@jstkdng Amazing work, thanks a lot!
It's pretty good right now!

ueberzugpp-multi.mp4

Can I contribute with a small change to crop the images? Right now I make sure they never get out of bounds, but this means they get resized.

It would look like this: https://gist.ro/kitty-crop.mp4

Thanks again for your work!

Sure, open a PR and we can look over the changes. Are you using OG ueberzug for testing?

3rd commented

Sure, open a PR and we can look over the changes. Are you using OG ueberzug for testing?

No, the original won't be supported, just ueberzugpp, kitty graphics protocol and sixels.
Thanks again!

Does kitty and sixel even work on neovim?

3rd commented

Does kitty and sixel even work on neovim?

Yep, the second link is kitty's normal protocol, but I got one with unicode placeholders working as well. The placeholder one has the same cropping issue, but works with tmux, so I'm considering doing the cropping myself...

How, ueberzugpp's sixel and kitty implementation doesn't work with neovim. Is some configuration required for it to work?

3rd commented
3rd commented

@jstkdng
Thanks for all the help, will get back with a cropping PR!

Got the experimental version working and put it out there, there's an ongoing discussion on it here: https://www.reddit.com/r/neovim/comments/14mjsvr/adding_image_support_to_neovim_kitty_tmux_amazing

I see, it seems kitty is only supported with the unicode placeholders.

3rd commented

I see, it seems kitty is only supported with the unicode placeholders.

Works without placeholders!

Hmmmm, unless the neovim terminal is somehow different than editor buffers then I don't understand. ueberzugpp also supports kitty, can you test with your software outside of tmux and check if ueberzugpp's kitty/sixel implementation works?