Problem
I’d like to flatten only a part of an image.
Image Example
Take for example this image:
It has transparent background, which I’d like to keep (rather than re-create), also the transparency between the cable casing and the machine (the casing is on the top of the machine). All other transparent parts of the image (i.e. the transparency in the machine itself) should be flatten.
What I Already Know
I’ve seen this question, but it deals only with not-fully-transparent pixels, however, I’d like to flaten all non-fully-opaque pixels in a part of a image.
I use this command to flatten whole image:
convert -flatten input.png output.png