Menu

#4 Support piping from/to stdin/stdout

open
5
2022-11-15
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

     
  • Nobody/Anonymous

    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.

     
  • NRK

    NRK - 2022-11-15

    I suppose this is still not implemented? Unfortunate. I wanted to be able to optimize my screenshots before stuffing them into the clipboard. Something like:

    $ maim -s | optipng | xclip -selection clipboard -t image/png
    
     

Log in to post a comment.