ImageMagickでは、テキストを囲む余分な部分を取り除きたい場合は、-graderity centerを設定してから、-trim + repageを使用して、必要なことがわかっている場合は-borderまたは-extentを使用して境界線を追加します出力サイズ。その後、西の前に-gravityを使用し、必要であれば
convert (-size 2115x560 xc:skyblue) (-size 1245x283! -background red -fill white -gravity center -font arial -interline-spacing -25 caption:"Interline-Spacing NOT WORKING\r\nwith Captions" -trim +repage -background red -extent 1245x283!) -gravity northwest -geometry +129+129 -composite temp.png
![enter image description here](https://i.stack.imgur.com/layZ6.png)
が白いテキストが左揃え - :Windowsで
convert \(-size 2115x560 xc:skyblue \) \(-size 1245x283! -background red -fill white -gravity center -font arial -interline-spacing -25 caption:"Interline-Spacing NOT WORKING\r\nwith Captions" -trim +repage -background red -extent 1245x283! \) -gravity northwest -geometry +129+129 -composite temp.png
またはこの:
は、この使用して、UNIXの構文をお試しくださいエクステンションと重力の西の字幕:
convert \(-size 2115x560 xc:skyblue \) \(-size 1245x283! -background red -fill white -gravity west -font arial -interline-spacing -25 caption:"Interline-Spacing NOT WORKING\r\nwith Captions" -trim +repage -background red -gravity west -extent 1245x283! \) -gravity northwest -geometry +129+129 -composite temp2.png
012スカイブルーと鉱山用フォント:
![enter image description here](https://i.stack.imgur.com/yborr.png)
は私-sizeの2115x560のXCの代わりに、あなたの入力画像を交換してください。