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

Test: Terminal image support #183563

Closed
2 tasks done
Tyriar opened this issue May 26, 2023 · 6 comments
Closed
2 tasks done

Test: Terminal image support #183563

Tyriar opened this issue May 26, 2023 · 6 comments

Comments

@Tyriar
Copy link
Member

Tyriar commented May 26, 2023

Refs: #182443

Complexity: 3

Create Issue


The terminal can now render images when using either sixel or iterm's image protocol.

Current limitations:

  • The image does not restore after VS Code reloads
@lszomoru
Copy link
Member

@Tyriar, I have updated the steps as there was a typo: imagecat <file> instead of imgcat <file>.

@roblourens
Copy link
Member

Cool!

@Tyriar
Copy link
Member Author

Tyriar commented May 30, 2023

@jerch FYI you can see all the feedback from the test round via the links to this issue

@jerch
Copy link

jerch commented May 30, 2023

@Tyriar Some early feedback from my side:

  • animated gif - This is currently not supported, as the image rendering gets triggered from normal terminal update/rendering. To get animations working a much more involved render logic will be needed, with its own cycling decoupled from normal terminal render cycles. I did not bother yet to look into that, it also looks tricky to me to not penalize mainthread perf too much.
  • copy output/HTML - Idk how the HTML is created - if through serialization then its not possible atm (serialization is still WIP). A more lightweight variant to get a hold of the image resource would be possible via getImageAtBufferCell(x: number, y: number): HTMLCanvasElement | undefined API call.

@Tyriar
Copy link
Member Author

Tyriar commented May 31, 2023

To get animations working a much more involved render logic will be needed, with its own cycling decoupled from normal terminal render cycles. I did not bother yet to look into that, it also looks tricky to me to not penalize mainthread perf too much.

If you generate bitmaps for the frames and cache them it shouldn't be too costly to render.

copy output/HTML - Idk how the HTML is created - if through serialization then its not possible atm (serialization is still WIP).

Yeah this would need some special handling and API, some way of xterm.js reaching out to an extension for cells that it owns or something

@Tyriar
Copy link
Member Author

Tyriar commented May 31, 2023

@jerch created some issues, we can move them over to the main repo after jerch/xterm-addon-image#49

@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants