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?


Try this:

convert test.png jpg:- | jp2a -

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.