now palette project lays here

This commit is contained in:
2026-03-04 22:13:30 +03:00
parent b9808c8150
commit 84d241e619
10 changed files with 35 additions and 6 deletions

View File

@@ -1,8 +1,14 @@
package imageutils
package util
import (
"image"
"image/png"
"os"
)
// ProcessImage takes input png image from stdin, processes it with f and outputs it to stdout.
func ProcessStdio(f func(image.Image) image.Image) {
img, err := png.Decode(os.Stdin)
func ProcessStdio(f func(image.Image) image.Image) error {
img, err := png.Decode(os.Stdin)
if err != nil {
return err
}