2016-02-20 119 views
0

如何我會追加以下命令成一個單一的命令ImageMagik:嵌套ImageMagik命令

convert -size 1024x1024 xc:none -draw "roundrectangle 0,0,1024,1024,40,40" png:- | convert AppStore.png -matte - -compose DstIn -composite [email protected] 
convert -resize 50% [email protected] [email protected] 
convert -resize 50% [email protected] [email protected] 
convert -resize 50% [email protected] Logo.png 
+0

你沒有給我們提供'Appstore.png',所以你的例子並不是最小和完整的。 –

回答

1

我想你也許想是這樣的:

convert AppStore.png -matte             \ 
    \(-size 1024x1024 xc:none -draw "roundrectangle 0,0,1024,1024,40,40" \) \ 
    -compose DstIn -composite -resize 50% -write MPR:basic     \ 
    \(MPR:basic -resize 50% -write [email protected] +delete \)     \ 
    \(MPR:basic -resize 25% -write Logo.png +delete \)     \ 
    [email protected] 

或者這個,如果你想避免MPR(存儲器程序寄存器):

convert AppStore.png -matte             \ 
    \(-size 1024x1024 xc:none -draw "roundrectangle 0,0,1024,1024,40,40" \) \ 
    -compose DstIn -composite -resize 50%         \ 
    \(+clone -resize 50% -write [email protected] +delete \)      \ 
    \(+clone -resize 25% -write Logo.png +delete \)      \ 
    [email protected]