new simple downscaling ideas

This commit is contained in:
2026-06-20 11:31:44 +03:00
parent 67ff655767
commit b75a8814a2
20 changed files with 395 additions and 65 deletions
+24
View File
@@ -0,0 +1,24 @@
package main
import (
"flag"
"image"
"git.nkpl.cc/twocookedfaggots/imageutils/downscale"
"git.nkpl.cc/twocookedfaggots/imageutils/util"
)
var x = flag.Int("x", 256, "dx value of new bounds")
var y = flag.Int("y", 256, "dy value of new bounds")
func main() {
flag.Parse()
if err := util.ProcessStdio(func(img image.Image) image.Image {
return downscale.GridDownscale{
Image: img,
Rectangle: image.Rect(0,0,x,y),
}
}); err != nil {
panic(err)
}
}