Image 如何通过一个巨大的列表(.txt)向图片添加文本,并为每张图片创建一个目录?

Image 如何通过一个巨大的列表(.txt)向图片添加文本,并为每张图片创建一个目录?,image,batch-file,imagemagick,Image,Batch File,Imagemagick,目前我有以下脚本: @echo off setlocal enabledelayedexpansion pushd "Tools\img\" convert COMMON2.png -gravity Center -font bold.ttf -pointsize 15 -annotate +45+0 "The Legend of Zelda Breath of the Wild" test.png xcopy test.png ..\..\ pause exit 我的问题是,文本不在应

目前我有以下脚本:

@echo off
setlocal enabledelayedexpansion
pushd "Tools\img\"

convert COMMON2.png -gravity Center -font bold.ttf -pointsize 15 -annotate +45+0 "The Legend of Zelda Breath of the Wild" test.png

xcopy test.png ..\..\

pause
exit
我的问题是,文本不在应该在的字段中:(

我不知道如何用大约3000个不同的文本执行这个命令,并将它们移动到每个文件的新目录中(我想知道是否所有的文件仍然被称为COMMON2.png)

(我使用以下命令将标题保存到.txt文件中:

@echo off

dir /b "Thumbnails\New\Named_Titles" > NES.txt

pause
)

谢谢你给我的每一个帮助^^


PS:很抱歉我的英语不好:(

这应该会让你知道如何开始:

convert label.png \( -size 150x -background none caption:"The Legend of Zelda Breath of the Wild" -trim \)  -gravity east -geometry +10 -composite result.png

或者可能是这样:

convert label.png \( -size 150x50 -background none caption:"The Legend of Zelda Breath of the Wild lots more text The Legend of Zelda Breath of the Wild lots more text" -trim \)  -gravity east -geometry +10 -composite result.png


如果您使用的是Windows,则必须计算出所需的转义-可能将
\(
\)
更改为
^(
^)

欢迎成为新用户。请接受。要获得帮助,您应该比其他人做得更多,首先展示您在代码中付出的努力。在脚本编写过程中,很少出现新问题。您的问题不是一个,可能您没有找到正确的搜索词。谢谢,我(完全)编辑了我的问题我不知道你期望的是什么。在编辑新文件夹内的副本之前,用15pt的粗体长文本填充大小为256px×64px的图像是不可能的。另一件事是你需要一个for循环来迭代文件并创建文件夹。请参阅及其变体
/F/D/R
好的,我如何获得Image Magick可以像其他程序员一样通过阅读文档和帮助文件来自动调整文本大小和换行,这不是一种脚本编写服务。很容易找到。