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

allow transparency composition #16

Open
jerch opened this issue May 9, 2022 · 9 comments
Open

allow transparency composition #16

jerch opened this issue May 9, 2022 · 9 comments

Comments

@jerch
Copy link
Owner

jerch commented May 9, 2022

In older terminals the graphics output would get printed above any previous content. With backgroundSelect=1 SIXEL has a mode to take advantage of that, where old pixels get not touched, if not explicitly colored by SIXEL data.

We cannot do it quite the same way, as we mix in graphics late during rendering. We could still fake the partial "overprinting" by allowing transparent pixels to blend with old pixels from a previous graphics print.

@tsl0922
Copy link

tsl0922 commented Aug 30, 2022

ohh, it's happing on ttyd(xterm.js) too, clear doesn't work.

image

@jerch
Copy link
Owner Author

jerch commented Aug 30, 2022

@tsl0922 eww- how did you end up with that output? Can you show me the commands?

@tsl0922
Copy link

tsl0922 commented Aug 30, 2022

well, I can't reporduce it stably

@pmp-p
Copy link

pmp-p commented Aug 30, 2022

well, I can't reporduce it stably

same i have it often randomly on pygbag debug screen https://pmp-p.github.io/python-wasm-plus/pythons.html#debug

edit/ i think it happens only when there's no scrolling before clear

@jerch
Copy link
Owner Author

jerch commented Aug 30, 2022

Well there is an aggressive optimization in xterm.js - it normally updates the screen only for lines, that have seen changes in the terminal buffer. The graphics layer does the same - it crops graphics information for those lines and clears + redraws it.

Meanwhile, as a quickfix, I can change that to full redraw and clear everything upfront. This should cure "sticky" image tiles. (created #32 for it)

If you can narrow down the circumstances when this happens, that would be really helpful. I kinda suspect some terminal action in xterm.js not properly updating the changed lines record, which the renderer evaluates for screen updates.

@jerch
Copy link
Owner Author

jerch commented Aug 30, 2022

@tsl0922, @pmp-p
Did a patch release 0.1.1 which hopefully fixes the issue. Please let me know if it doesnt work for you.

@pmp-p
Copy link

pmp-p commented Aug 30, 2022

@jerch i would gladly try it and even provide a python testsuite later, but could you provide a build ( maybe CI+gh-pages ? ) . Tbh i don't remember how i've built the addon (xterm.js + xterm-addon-image.js + xterm-addon-image-worker.js) ~6 month ago and i'm not usually very lucky when building xterm.js or typescript stuff in general.

@jerch
Copy link
Owner Author

jerch commented Aug 30, 2022

@pmp-p If free CDN assets dont scare you, you could download the needed resources from here:

Alternatively you can also download the npm package (npm repo might be more trustworthy) and extract the assets from the lib/ folder. You can grab the tarball url from https://registry.npmjs.org/xterm-addon-image/.

pmp-p added a commit to pygame-web/archives that referenced this issue Aug 30, 2022
@pmp-p
Copy link

pmp-p commented Aug 30, 2022

here's my findings #32 (comment)

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