Skip to content

Commit 2a56c66

Browse files
committed
Merge branch 'master' of https://github.com/mattn/go-sixel
2 parents fa15200 + cdfbdd9 commit 2a56c66

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/gosr/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"bufio"
45
"flag"
56
"fmt"
67
"image"
@@ -79,7 +80,10 @@ func render(filename string) error {
7980
}
8081
img = tmp
8182
}
82-
enc := sixel.NewEncoder(os.Stdout)
83+
buf := bufio.NewWriter(os.Stdout)
84+
defer buf.Flush()
85+
86+
enc := sixel.NewEncoder(buf)
8387
enc.Dither = true
8488
return enc.Encode(img)
8589
}

0 commit comments

Comments
 (0)