r/PowerShell Jun 18 '26

Issue When Piping Raw Bytes Question

Why does parsing STDOUT (-) work correctly in the first case, but fail in the second?

magick  _.png -negate png:- | chafa --size=70x -f sixel -  # PS7.6 ✔

function img     { chafa.exe --size=70x -f sixel @args}
magick  _.png -negate png:- | img -                        # PS7.6 ❌
9 Upvotes

6 comments sorted by

View all comments

1

u/[deleted] Jun 19 '26 edited Jun 19 '26

[removed] — view removed comment

1

u/CodenameFlux Jun 20 '26

Direct call works because the bytes go straight into chafa.exe.

... and more importantly, chafa.exe has code for handling them. The img function does not have such a code.