#4 Support piping from/to stdin/stdout

open
Cosmin Truta
5
2014-08-28
2008-09-28
blotch
No

Please add support for piping like

pngoutput.exe | optipng - out.png

None of the png optimizers support this

Discussion

  • Matthew
    Matthew
    2008-10-25

    For what it's worth, actually pngout uses stdin/out if you give "-" as the relevant filename, e.g.
    pngout - - < file1.png > file2.png

     
  • Thanks for the tip!

     
  • Cosmin Truta
    Cosmin Truta
    2008-10-28

    • assigned_to: nobody --> cosmin
     
  • Cosmin Truta
    Cosmin Truta
    2008-10-28

    Hi,
    Thanks for the suggestion. I will put this on the to-do list. It will probably not be done by the next release, and, if done, it will incur an overhead due to an extra image read/write operation (that is not done during processing of regular files); I cannot guarantee it, but I will at least look at it.

    Best regards,
    Cosmin

     
  • Sindre Sorhus
    Sindre Sorhus
    2014-01-15

    Any updates on this?

    We need this for https://github.com/kevva/image-min so we can make it fully streaming.

     
  • Cosmin Truta
    Cosmin Truta
    2014-01-18

    In OptiPNG-Hg there is currently the option -stdout, but no support for stdin yet.