mirror of
https://github.com/esimov/caire.git
synced 2025-10-30 03:21:48 +08:00
add support for piping with stdin and stdout
This commit is contained in:
@@ -235,7 +235,7 @@ func (p *Processor) Process(r io.Reader, w io.Writer) error {
|
||||
case *os.File:
|
||||
ext := filepath.Ext(w.(*os.File).Name())
|
||||
switch ext {
|
||||
case ".jpg", ".jpeg":
|
||||
case "", ".jpg", ".jpeg":
|
||||
err = jpeg.Encode(w, res, &jpeg.Options{Quality: 100})
|
||||
case ".png":
|
||||
err = png.Encode(w, res)
|
||||
|
||||
Reference in New Issue
Block a user