Repository navigation
Add Sixel graphics device support - #223
Open
RestlessTail wants to merge 6 commits into
Open
RestlessTail wants to merge 6 commits into
RestlessTail wants to merge 6 commits into
Conversation
RestlessTail
force-pushed
the
sixel-device
branch
from
November 19, 2026 16:08
0a250db to
c7d1f2c
Compare
Author
|
Thanks for adding the tests! There is one compatibility issue I'd like to discuss. The implementation currently uses a few C++17 features (structured bindings and I'm considering rewriting those parts to keep C++14 compatibility rather than raising the required C++ standard. Would you prefer that approach? Also, just for context, |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #221
This PR adds a new
agg_sixel()graphics device toragg, enabling R graphics to be rendered directly to the terminal using the SIXEL bitmap graphics protocol.The output is written to standard output when the graphics device is closed with
dev.off(). This allows plots to be displayed in terminal emulators that support SIXEL graphics.Implementation Details
agg_sixel()graphics device.Usage
The resulting SIXEL data is written to standard output and can be rendered by compatible terminal emulators.
Output Handling
The SIXEL output is written directly to
stdoutusingfwrite(), since it consists of terminal escape sequences and should ideally be interpreted by a terminal emulator rather than displayed as text in an R GUI console.This triggers a
devtools::check()NOTE about writing tostdoutfrom compiled code. I'm not entirely sure whether there is a more appropriate R API for this use case, so I'd appreciate your advice on whether this approach is acceptable or if there is a better alternative.Testing
Verified on the following terminals:
enableImages,gpuAcceleration, andwindowsUseConptyDll(only on Windows)xterm -ti 340