This commit is contained in:
XoxJlopeZi4BB 2025-01-26 07:24:52 +04:00
parent de20f82fb4
commit eca0f6a60f

View File

@ -24,6 +24,7 @@ func Resolution() (w int, h int) {
}
var devfb *os.File
var width, height = Resolution()
func init() {
var err error
@ -40,8 +41,8 @@ func Bytes(c color.Color) []byte {
func Draw(img image.Image) error {
buf := bufio.NewWriterSize(devfb, 1<<16)
for h := 0; h < Height; h++ {
for w := 0; w < Width; w++ {
for h := 0; h < height; h++ {
for w := 0; w < width; w++ {
_, err := buf.Write(Bytes(img.At(w, h)))
if err != nil {
return err