renamed
This commit is contained in:
21
cmd/downscale/main.go
Normal file
21
cmd/downscale/main.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user