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)
	}
}
