mirror of https://github.com/liamg/aminal.git
fix conflict
This commit is contained in:
parent
a0843f3e52
commit
ce5eedf7c8
|
@ -1,14 +1,9 @@
|
||||||
package sixel
|
package sixel
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"io"
|
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"golang.org/x/image/bmp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// from https://en.wikipedia.org/wiki/Sixel
|
// from https://en.wikipedia.org/wiki/Sixel
|
||||||
|
@ -26,19 +21,4 @@ func TestParsing(t *testing.T) {
|
||||||
img := six.RGBA()
|
img := six.RGBA()
|
||||||
require.NotNil(t, img)
|
require.NotNil(t, img)
|
||||||
|
|
||||||
var imageBuf bytes.Buffer
|
|
||||||
err = bmp.Encode(io.Writer(&imageBuf), img)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write to file.
|
|
||||||
fo, err := os.Create("img.bmp")
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
defer fo.Close()
|
|
||||||
fo.Write(imageBuf.Bytes())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue