Page 5 of 5

Re: Count amount of non-continuous blocks in an image

Posted: 2020-03-19T01:00:33-07:00
by Peggy
snibgo wrote:
For the flower image, the input has transparent black pixels, with bands of transparent white at top and bottom. We can see these with:

Code: Select all

magick sixFlower.png -alpha off sixflower_na.png
The result sixflower_na.png is:

The connected-component list correctly shows six components that are neither black nor white.

You now use a v7 version of IM. I suggest you should use "magick" instead of "convert".
Alright, got it. Thank you :D