1
ImageMagickを初めて使用しました.3つの異なる画像に3種類のラベルを追加して、それぞれがコーナーにある背景画像に挿入しようとしています。ImageMagickを使用して複数の画像とテキストを結合する
すべての画像とテキスト文字列は手前にありません。そのため、これを処理するスクリプトを作成しています。私の最新の(失敗した)試みは次のとおりです:
convert -page +0+0 ${bg}.png \
\(-page +0+0 -gravity south -pointsize 16 \
-stroke '#000C' -strokewidth 4 -annotate 0 "$label" \
-stroke none -strokewidth 20 -fill white -annotate 0 "$label" \) \
\(-page +0+0 ${im1}.png \
-stroke '#000C' -strokewidth 2 -annotate 0 "text1" \
-stroke none -fill white -annotate 0 "text1" \) \
\(-page +${hor_offset}+0 {im2}.png \
-gravity south -pointsize 14 \
-stroke '#000C' -strokewidth 2 -annotate 0 "text2" \
-stroke none -fill white -annotate 0 "text2" \) \
\(-page +0+${ver_offset} ${im3}.png \
-stroke '#000C' -strokewidth 2 -annotate 0 "text3" \
-stroke none -fill white -annotate 0 "text3" \) \
+page -flatten out.png
私は以前より良い結果を出しましたが、主に偶然であり、専門家の助けを求めることにしました。
最終的な結果は次のようになります。Expected result