imagemagick7与imagemagick6中的合成不传输颜色

imagemagick7与imagemagick6中的合成不传输颜色,imagemagick,Imagemagick,我使用imagemagick构建我的应用商店图标。多年来,imagemagick6一直在使用该过程。图标构建过程中的最后一步是合成一个带有白色文本的蓝色正方形和一个圆形白色矩形。当我升级到imagemagick7时,最后一步生成了一个带白色文本的圆形黑色图标。以下是我的shell脚本中的代码: # build a file with the two text lines centered with different, large point sizes for each # then resi

我使用imagemagick构建我的应用商店图标。多年来,imagemagick6一直在使用该过程。图标构建过程中的最后一步是合成一个带有白色文本的蓝色正方形和一个圆形白色矩形。当我升级到imagemagick7时,最后一步生成了一个带白色文本的圆形黑色图标。以下是我的shell脚本中的代码:

# build a file with the two text lines centered with different, large point sizes for each
# then resize to the proper width
convert\
    -gravity center\
    -background transparent\
    -fill white\
    -font ArialB\
    -pointsize ${TEXTSIZE} label:"${TEXT}"\
    -pointsize ${TEXT2SIZE} label:"${TEXT2}"\
    -append\
    -resize $TEXTWIDTH\
    tmpText.png
# build a background image with a radial gradient
convert\
    -gravity center\
    -size ${ICONSIZE}x${ICONSIZE} radial-gradient:"rgb(0,50,255)"-"rgb(0,0,127)"\
    tmpBase.png
# combine the two
composite\
    -gravity center\
    tmpText.png tmpBase.png $FILENAME

在imagemagick7中,最后两个文件tmpText.png和tmpBase.png看起来是正确的,但输出不正确。我尝试了几种不同的合成步骤,但都没有成功。我最终降级回imagemagick6,事情又开始了,但这不是一个长期的解决方案。有什么想法吗?

使用ImageMagick 7,用magick替换convert。也可以用magick composite替换composite

因此,对于IM 6:

convert\
    -gravity center\
    -background transparent\
    -fill white\
    -font ArialB\
    -pointsize 24 label:"Testing1"\
    -pointsize 24 label:"Testing2"\
    -append\
    -resize 200% \
    tmpText.png
# build a background image with a radial gradient
convert\
    -gravity center\
    -size 500x500 radial-gradient:"rgb(0,50,255)"-"rgb(0,0,127)"\
    tmpBase.png
# combine the two
composite\
    -gravity center\
    tmpText.png tmpBase.png fred_test6.png

我得到:

我7岁

magick\
    -gravity center\
    -background transparent\
    -fill white\
    -font ArialB\
    -pointsize 24 label:"Testing1"\
    -pointsize 24 label:"Testing2"\
    -append\
    -resize 200% \
    tmpText.png
# build a background image with a radial gradient
magick\
    -gravity center\
    -size 500x500 radial-gradient:"rgb(0,50,255)"-"rgb(0,0,127)"\
    tmpBase.png
# combine the two
magick composite\
    -gravity center\
    tmpText.png tmpBase.png fred_test7.png
我得到:


有没有理由不在一个命令中完成所有操作?你需要中间文件来做其他事情吗?