Basically, I have a image with a thick yellow border around it something like NetGeo image. I want to check if there is border or not (NetGeo is just an example, border color can be of any width and any color), I want to detect that and shave it if it exists.
I see this question is been answered in Trim whitespace using PIL for PIL but I am looking for same solution in imagemagick with a single command or java
But I don't want to crop the image if there is not solid border.
I don't want to remove the yellow color as it is not a solid lined border. Hope it helps to understand the question.