ImageMagick: Is there an equivalent of Gimp's tool to “shrink” and “grow” a selection?
问题 I have a black and white mask image produced with this ImageMagick command: convert in.jpg -threshold 85% out.png Giving me this result: I'd like to reduce the size of each piece like if I was doing it with Gimp by selecting the white background, inverting the selection and shrink it by X pixels. Is it possible to do it with ImageMagick and if yes, how ? 回答1: In Imagemagick, you can use -morphology close to reduce the white holes in the black. But if you use too large a kernel size, it will