This commit is contained in:
2025-12-14 06:04:57 +03:00
parent 2709034fc3
commit 02ece86303
23 changed files with 633 additions and 2 deletions

21
cmd/downscale2x/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)
}
}