Code: Select all
convert input.png -separate \( -clone 0,1 -compose Darken -composite \) \( -clone 2,3 -compose Darken -composite \) -delete 0-3 output.png
Any ideas very much appreciated!
Code: Select all
convert input.png -separate \( -clone 0,1 -compose Darken -composite \) \( -clone 2,3 -compose Darken -composite \) -delete 0-3 output.png
Code: Select all
convert input.png -separate -evaluate-sequence min output.png
snibgo wrote:Note that if the input has an alpha channel, in v7 "magick", "-separate" will give four outputs, where v6 gives three.
So, if you may upgrade to v7 in the future, I suggest you put "-channel RGB" before "-separate", and "+channel" after it.