-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Add SixelImage #1679
base: main
Are you sure you want to change the base?
Add SixelImage #1679
Conversation
I've left the I used cursor-right control codes to simulate transparent pixels in the canvas which breaks the snapshot tests for canvas rendering. Using those characters could be only under sixel rendering circumstances but I'm not sure how @patriksvensson wanted to reorganize this so they're still broken atm. |
I'll take a look at this asap |
I think there might be opportunities for some interesting use cases for the Sixel output independent of ImageSharp. Might be cool if the parsing and building of the ansi was part of Spectre.Console itself with the code to convert an ImageSharp frame being the only code with dependencies on ImageSharp. |
@phil-scott-78 Yes, that was my initial idea as well, but quickly realized that it's a pretty daunting task without a library behind it. Open to refactor it out later, and make it available without the ImageSharp library, but for now I think it's ok. |
FYI I noticed an issue using this approach in layouts. Because the Sixel data is drawn before the top left of the canvas when it draws the Sixel it can extend below the bottom of the window and scroll the layout which breaks the rendering if the image is taller than the available space in the layout. I tried shifting the sixel to render after the Canvas so that if the whole canvas can't fit inside a layout it would never output the sixel data but it's pretty janky ShaunLawrie#1 |
fixes #1678
Some discussion in #1671
And more discussion on https://bsky.app/profile/shaunlawrie.com/post/3lao4uw5eos2m
Changes
Add a first cut of sixel for @patriksvensson to play with.
This is modified source from mine and @trackd's sixel tinkering in https://github.com/trackd/Sixel and PwshSpectreConsole, it's all MIT so free to consume.
Please upvote 👍 this pull request if you are interested in it.