Feature request: optional color parameter for -trim

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Lebostein
Posts: 8
Joined: 2011-09-13T11:07:46-07:00
Authentication code: 8675308

Feature request: optional color parameter for -trim

Post by Lebostein »

I know, there are komplex workarounds for that problem. But why you don't add an optional color paramerer to the trim function to trim a specific color? I think this is a very often used function, but with that auto color detection not praticable in most cases.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Feature request: optional color parameter for -trim

Post by fmw42 »

Perhaps you can explain further how this helps. Can you upload an example image to dropbox.com and put the URL here? Then explain what you are trying to achieve by adding a color to -trim.

You can add a border around the image of the desired color, then do a trim to achieve what I think you might want to do.

Code: Select all

convert image -bordercolor yourcolor -border 1 -trim +repage resultimage
Post Reply