Files
imageutils/cmd/scale/griddownscale.go
T
2026-06-21 02:37:34 +03:00

25 lines
484 B
Go

package main
import (
"flag"
"image"
"git.nkpl.cc/twocookedfaggots/imageutils/pkg/downscale"
"git.nkpl.cc/twocookedfaggots/imageutils/util"
)
var x = flag.Int("x", 1024, "dx value of new bounds")
var y = flag.Int("y", 1024, "dy value of new bounds")
func main() {
flag.Parse()
if err := util.ProcessStdio(func(img image.Image) image.Image {
return downscale.GridDownscale{
Image: img,
NewBounds: image.Rect(0, 0, *x, *y),
}
}); err != nil {
panic(err)
}
}