This commit is contained in:
2025-12-14 06:07:13 +03:00
parent 02ece86303
commit 1db672d481
2 changed files with 0 additions and 0 deletions

21
cmd/downscale/main.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"image/jpeg"
"image/png"
"os"
)
func main() {
// open image
img, err := jpeg.Decode(os.Stdin)
if err != nil {
panic(err)
}
// no pre-processing needed so we just
// write image
err = png.Encode(os.Stdout, Downscaled{img, 3})
if err != nil {
panic(err)
}
}