cleaning up, early http server draft

This commit is contained in:
2026-01-24 09:39:27 +03:00
parent d52658ab5c
commit cc5c9c6d1a
23 changed files with 123 additions and 0 deletions

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