fuuuu
This commit is contained in:
parent
de20f82fb4
commit
eca0f6a60f
@ -24,6 +24,7 @@ func Resolution() (w int, h int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var devfb *os.File
|
var devfb *os.File
|
||||||
|
var width, height = Resolution()
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
var err error
|
var err error
|
||||||
@ -40,8 +41,8 @@ func Bytes(c color.Color) []byte {
|
|||||||
|
|
||||||
func Draw(img image.Image) error {
|
func Draw(img image.Image) error {
|
||||||
buf := bufio.NewWriterSize(devfb, 1<<16)
|
buf := bufio.NewWriterSize(devfb, 1<<16)
|
||||||
for h := 0; h < Height; h++ {
|
for h := 0; h < height; h++ {
|
||||||
for w := 0; w < Width; w++ {
|
for w := 0; w < width; w++ {
|
||||||
_, err := buf.Write(Bytes(img.At(w, h)))
|
_, err := buf.Write(Bytes(img.At(w, h)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user