-
Notifications
You must be signed in to change notification settings - Fork 39
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
support DRCS Sixel Graphics #7
Conversation
Can you please update the README with info about which terminal(s)/OS (with links) are supported by this feature? |
Sorry, I don't understand what we should fix about cellWidth/cellHeight. |
Basically, instead of having a |
For example, separate to cellWidthIterm/cellHeightIterm, and cellWidthSixel/cellHeightSixel ? |
You're right, it would make |
About terminal support, I tried xterm as listed but it does not work:
Are you referring to a specific version of xterm? |
This list might be more helpful: https://github.com/saitoha/PySixel#requirements |
Hmm, xterm/mlterm seems not render transparent colors correctly. |
The area under lines are painted as black or gray? Or transparent with white? |
They have alpha with the line's color. The size is also wrong. I guess it's because you can't get the cell size. There is absolutely no way to get the term size in pixels with Sixel? |
I don't have Mac so I can't try jplot on iTerm2. How jplot works on white background? |
@saitoha go-sixel doesn't handle alpha colors. Can you figure out this problem? |
Rebased from master branch. If I still have a change, could you please try this patch of go-sixel? diff --git a/sixel.go b/sixel.go
index 8fdda6c..b5459f2 100644
--- a/sixel.go
+++ b/sixel.go
@@ -32,7 +32,7 @@ const (
// Encode do encoding
func (e *Encoder) Encode(img image.Image) error {
- nc := 256 // (>= 2, 8bit, index 0 is reserved for transparent key color)
+ nc := 255 // (>= 2, 8bit, index 0 is reserved for transparent key color)
width, height := img.Bounds().Dx(), img.Bounds().Dy()
// make adaptive palette using median cut alogrithm
q := median.Quantizer(nc - 1) |
@mattn Traditional sixel format can represent transparent background(alpha=0). Some terminal implementations can understand alpha-channeled palette. But go-sixel does not support it. |
I fixed problem that can't recognize terminal width/height. Also fixed white background issue. |
Sorry I think I wasn't clear. My question about |
On my side, I'm sorry.
Sorry too. No. sixel is dsc. Could you please explain what do you like to change? Thanks. |
It’s more a brainstorm question. Can dsc be considered a subset or osc or they are two very different beats? |
How about more abstract name like |
|
I just tested this branch with |
Some good sixel tricks here: https://raw.githubusercontent.com/hackerb9/lsix/master/lsix |
Which go version did you try? |
Current build on master branch seems broken. This pull request include fixes for that. |
@rs Do you have plan to merge this? If not, I'll maintenance this fork. |
This PR add DRCS Sixel Graphics support. Current implementation doesn't handle terminal cell width/height. So It draw 8x8 size always. #6
Screenshot is taken on Windows. But I removed Windows support since msys2 terminal doesn't have enough feature to support jplot.