crop image borders based on color
Posted: 2008-09-16T09:29:46-07:00
I think this might be impossible to do, but I'll ask anyway...
If I have an image (png) with a border/margin around its edges of unknown width and of a specific color, would it be possible to automatically crop the border based on color?
I.E., I have a 300x300px image, with a flower in the center of a white box/background, and then a 100px black margin all around the edges of the white area. I wouldnt know beforehand how wide the black margin is, so I would need to tell imagemagick "trim off all of the black border, leave just the white box/background with flower....
Is there anything like this available through imageMagick???
Please help, thanks...
If I have an image (png) with a border/margin around its edges of unknown width and of a specific color, would it be possible to automatically crop the border based on color?
I.E., I have a 300x300px image, with a flower in the center of a white box/background, and then a 100px black margin all around the edges of the white area. I wouldnt know beforehand how wide the black margin is, so I would need to tell imagemagick "trim off all of the black border, leave just the white box/background with flower....
Is there anything like this available through imageMagick???
Please help, thanks...