Your test command works for me, it looks that your system lacks something.
Anyway, the text
format is used rather for paging text on multiple pages. If your goal is to create an image from a short plain text you can try the label
format:
convert -background black -fill green -pointsize 84 \
-font Helvetica label:'Unix&Linux' test.png
Additionally, you may find xargs
handy if your text comes from the other command and you need to pipe it to the convert
(as in the question):
echo 'Unix&Linux' | xargs -I '{}' convert -background black -fill green \
-pointsize 84 -font Helvetica label:'{}' test.png
You may find many useful examples on the Imagemagick site.
Another relatively simply tool would be old good tex
:
echo 'Unix&Linux' | cat - <<<'\bye' > test.tex
tex test.tex && dvipng -o test.png test.dvi
But that would work only for very simple task, if you want to add colors or change fonts then dedicated instructions in tex file should be added which makes this inefficient in one-time use in interactive shell.
convert caption:@-
to get line folding. Beware, it is cpu intensive.convert caption:@-
, stdin is ignored and a literal@-
is converted