How to remove semitransparent pixels
Posted: 2015-06-03T15:46:13-07:00
I would like to remove pixels with less than ~20 opacity, and "Anti-erase" anything else. (I'm not quite sure of the technical name for it, but what I mean by "Anti-erase" is to make the pixel the same color with no transparency).
I've already tried this:
But the problem is, I'm left with random pixels that were really transparent, now completely shown, and the pure white and black of the image is now transparent. Is there a way I can achieve the results I want? Here is a sample image input and output:
I've already tried this:
Code: Select all
convert -alpha off input.png miff:- | convert -transparent white - miff:- | convert -transparent black - output.png