The best I can do so far, isn't that elegant. Change white to another color (which matches the default background of an app, but it would be better if it were transparent)
Code: Select all
convert -transparent "#ffffff" -trim -fuzz 3% -background "#ebebeb" -extent 0x0 +matte
- Replace all white pixels in the image with transparency (easy enough to do).
Code: Select all
convert -transparent "#ffffff" -fuzz 3%
- find the outlines in the image, and add a thicker white outline (to make it look good)
- due to the replacement method in 1, there will be inevitable small "holes" inside the image. I would like a fairly decent way to fill these in with white again, in addition to having the outline. Perhaps the step in 2 will be sufficient enough to fill them in? (creating a completely white mask image that has everything inside filled in and overlaying it might do the trick?)