I try to use nconvert with stdin and stdout but met two problems.
When I pipe a png file to nconvert,
Code: Select all
cat ./test.png | nconvert -quiet -out jpeg -o stdout stdin
Code: Select all
Error: Don't know how to read this picture (stdin)
Code: Select all
cat ./test.jpeg | nconvert -quiet -out jpeg -o stdout stdin
Code: Select all
Version : 10 16
So I need to remove the first line of output:
Code: Select all
cat ./test.jpeg | nconvert -quiet -out jpeg -o stdout stdin | tail -n +2
BTW: The test env is macOS with m1 chips.