Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
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).
convert -alpha off input.png miff:- | convert -transparent white - miff:- | convert -transparent black - output.png
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 solved my problem. By converting to gif and back, the semitransparent pixels are automatically either removed or "Anti-erased". Thus, this works perfectly:
It would have been nice if you had provided the source image by itself. So, I cropped it out and called it Example2.png. The following seems to work for me.