Code: Select all
magick convert input.png -fill red -colorize 100% output.png
There are two ways I can think of, but I'm not sure how to do them:
1. Chop the image to remove the border, colorize, then paste it on top of the original. In this case, I also need to remove the middle of the original image as there is transparency which might conflict if it was just added.
2. A "darken only" option. The borders are black (this is an Android 9.png image) and everything inside is white with varying opacity.
I'd like to do the following without knowing the image size in advance. But the border will always be 1 pixel wide.
Using "colorify" on GIMP gives me the output I desire, as it doesn't change black pixels, but I also couldn't find that option on ImageMagick.
I am using IM 7 in Bash for Windows
Thank you