Closed rikonor closed 6 years ago
Hi,
The following fails:
# Substituting stdin $ cat img.jpg | jpeg-recompress - img.min.jpg invalid input file: -
The following succeeds:
# No substitution $ jpeg-recompress img.jpg img.min.jpg # Substituting stdio $ jpeg-recompress img.jpg - > img.min.jpg
Based on https://github.com/danielgtaylor/jpeg-archive/issues/9 I was hoping to be able to stream a file via stdin.
I had also tried doing something similar using named pipes:
# terminal 1 $ mkfifo inPipe $ cat img.jpg > inPipe # terminal 2 $ mkfifo outPipe $ cat outPipe > img.min.jpg # terminal 3 $ jpeg-recompress inPipe outPipe
In the above, terminal 1 will finish, but terminal 2 and terminal 3 will hang forever.
terminal 1
terminal 2
terminal 3
Tested all of the above on linux and osx.
This should be solved by https://github.com/danielgtaylor/jpeg-archive/pull/85
Fixed in 76b1868 (Only read input once, 2018-03-14).
Hi,
The following fails:
The following succeeds:
Based on https://github.com/danielgtaylor/jpeg-archive/issues/9 I was hoping to be able to stream a file via stdin.
I had also tried doing something similar using named pipes:
In the above,
terminal 1
will finish, butterminal 2
andterminal 3
will hang forever.Tested all of the above on linux and osx.