Skip to main content

`Convert` and standard output [Resolved]

I am learning how to use terminal and as an exercise tried to convert a bunch of .png images to ASCII-art using convert and jp2a with this command:

convert test.png -format jpg - | jp2a -

This results in error message, indicating that jp2a receives a .png file:

Not a JPEG file: starts with 0x89 0x50

As I understood, convert with - argument outputs both the input and the output files. Is it possible to pipe only the converted file?

Question Credit: Test Osterone
Question Reference
Asked May 13, 2019
Posted Under: Unix Linux
1 Answers

Try this:

convert test.png jpg:- | jp2a -

credit: Freddy
Answered May 13, 2019
Your Answer