2017-11-10 91 views
0

我曾经是能够将文本转换为使用ImageMagick的图像,但现在我收到此错误信息:ImageMagick的无编码代表

$ echo text | convert -background none text:- file 
convert: no encode delegate for this image format `TEXT' @ error/constitute.c/WriteImage/1167. 

使用自制

imagemagick: stable 7.0.7-10 (bottled), HEAD 
Tools and libraries to manipulate images in many formats 
https://www.imagemagick.org/ 
/usr/local/Cellar/imagemagick/7.0.7-10 (1,523 files, 23.1MB) * 
    Poured from bottle on 2017-11-10 at 15:46:33 
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/imagemagick.rb 

回答

0

安装ImageMagick的在IM 7 ,转换被magick取代。您还没有为“文件”指定输出图像格式。试试这个:

echo "text" | magick -background none text:- file.png 

echo "text" | magick -background none text:- PNG32:file 


这对我的作品在IM 7.0.7.10 Q16的Mac OSX

你怎么从

magick -version 

得到它包括freetype?

如果不是,那么您可能需要通过自制软件安装带ImageMagick的Freetype