【问题标题】:Create a text with image magick使用图像魔术创建文本
【发布时间】:2017-02-07 11:36:57
【问题描述】:

我正在尝试创建一个具有文本和透明背景的图像文件。

我使用了这个命令:

convert -background black -fill blue \ -font Arial -pointsize 72 label: \ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam invidunt ut labore . invidunt ut labore . output.png

但它并没有给我创造任何东西,我收到了这个错误/消息:

convert.exe: 无法打开图像'\': 没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image '\': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像'Lorem':没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'ipsum': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像'dolor':没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'sit': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像“amet”:没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'consetetur': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像“sadipscing”:没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'elitr': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像“sed”:没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'diam': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像'nonumy':没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'eirmod': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像“临时”:没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'invidunt': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像“ut”:没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'labore': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像'et':没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'dolore': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像“magna”:没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'aliquyam': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像“invidunt”:没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'ut': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像'labore':没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image '.': Permission denied @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像“invidunt”:没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image 'ut': No such file or directory @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe: 无法打开图像'labore':没有这样的文件或目录@ 错误/blob.c/OpenBlob/2695。 convert.exe:没有解码委托 图像格式' @ error/constitute.c/ReadImage/508. convert.exe: unable to open image '.': Permission denied @ error/blob.c/OpenBlob/2695. convert.exe: no decode delegate for this image format'@error/constitute.c/ReadImage/508。转换.exe:没有 图像定义 `output.png' @ 错误/convert.c/ConvertImageCommand/3235.

【问题讨论】:

    标签: command imagemagick imagick


    【解决方案1】:

    C:\OPV2\binaries\FontToImage\convert.exe 标签:"abcd" C:\OPv2\test.png convert.exe:无法打开图像“标签:abcd”:没有这样的文件或目录@error/blob.c/OpenBlob/3491。 convert.exe: 此图像格式没有解码委托 ' @ error/constitute.c/ReadImage/556. convert.exe: no images definedC:\OPv2\test.png' @error/convert.c/ConvertImageCommand/3300。

    很奇怪,不是吗? 在我的本地计算机上,它是工作文件

    C:\OPV2\binaries\FontToImage\convert.exe --version 版本:ImageMagick 7.0.8-23 Q16 x64 2019-01-02 http://www.imagemagick.org 版权所有:版权所有 (C) 1999-2018 ImageMagick Studio LLC 许可证:http://www.imagemagick.org/script/license.php 视觉 C++:180040629 特点:密码 DPC 模块 OpenMP 代表(内置): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib

    标签未重新整理...

    【讨论】:

    • 您好,欢迎来到 SO。请考虑编辑和格式化您的答案,以便每个人都更容易理解。可以参考this寻求帮助。
    【解决方案2】:

    试试这个:

    convert -background black -fill blue -font Arial -pointsize 72 label:"Lorem ipsum" output.png
    

    【讨论】:

    • 是的 - 以便 ImageMagick 知道您的标签在哪里开始和结束。
    猜你喜欢
    • 1970-01-01
    • 2011-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-30
    • 2018-10-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多