2016-02-13 102 views
0

我想添加一個圖案重複圖像作爲另一個具有空格的圖像的背景。例如,我有模式200x200和圖像1200x800。我已經完成添加背景顏色。使用ImageMagick將圖案重複圖像添加爲另一圖像的背景

命令我使用添加背景顏色

convert -background "#333" -resize 768x450 -gravity Center -extent 768x450 

現在我需要補充的而不是顏色的圖案。有些人建議我應該將圖案製作爲最大尺寸的圖像,然後用它作爲背景圖像添加。

是否可以使用convert或任何其他命令使用ImageMagick

回答

6

不確定你的意思,但我猜是這樣。讓我們做一個200×200瓦,開始了:

convert -size 200x200 radial-gradient:red-blue t200x200.png 

enter image description here

現在你想通過平鋪是基本單位做出1200x800圖像:

convert -size 1200x800 tile:t200x200.png BigBoy.png 

enter image description here

如果你現在想要在和諧,微妙的背景之上覆蓋精美的藝術品,高品質的中心肖像,你可以這樣做:

convert -size 1200x800 tile:t200x200.png -gravity center smiley.gif -composite BigBoy.png 

enter image description here

+1

Upvoted爲美麗的藝術品。 – tbm