Giter Club home page Giter Club logo

go-sixel's Introduction

go-sixel

DRCS Sixel Encoder/Decoder

Installation

$ go get github.com/mattn/go-sixel

You can install gosr (go sixel renderer), gosd (go sixel decoder) with following installation instruction.

$ go get github.com/mattn/go-sixel/cmd/gosr
$ go get github.com/mattn/go-sixel/cmd/gosd
Command Description
gosr Image renderer
gosd Decoder to png
goscat Render cats
gosgif Render animation GIF
gosl Run SL

Usage

Encode

$ cat foo.png | gosr -

Decode

$ cat foo.drcs | gosd > foo.png

Use as library

img, _, _ := image.Decode(filename)
sixel.NewEncoder(os.Stdout).Encode(img)

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)

go-sixel's People

Contributors

bamchoh avatar diamondburned avatar fumiyas avatar hnw avatar mattn avatar saitoha avatar yoichi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-sixel's Issues

mintty-2.9.5 works only sometimes

Not sure if this is an issue with go-sixel or rather mintty, or the environment.
gosr image.png sometimes works, somtimes it prints text to the terminal.
This is windows 7, mintty-2.9.5 on msys-2 installed and updated today.

Which setup do you use on windows? Have you seen this as well?

Add a LICENSE file

Would you add a LICENSE file to this library? It will help some automation collecting LICENSE files.

Minor note about palette handling in encode

Here you state to reserve color slot 0 for transparent (aka background color):

nc := 255 // (>= 2, 8bit, index 0 is reserved for transparent key color)

Following the SIXEL spec in DEC STD 070 this is actually not needed, there is no link or notion in the spec of slot 0 being reserved for unencoded pixels. The addressable color slots are independent from the background color (thus you can use all 256 slots). The background color itself is something a device might provide by other means (prolly startup color or BCE).

Can't install

The command go get github.com/mattn/go-sixel/cmd/gosr on my go version 1.19.5 complains that go get is no longer supported outside a module.
So I try: go install github.com/mattn/go-sixel/cmd/gosr@latest but that says:
The go.mod file for the module providing named packages contains one or more replace directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module.

What would be the best way to install gosr for me?

broken alpha?

I'm trying to fix one problem.
foo

When encode with go-sixel, image has some black pixels

@saitoha can you figure out cause of this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.