Re: How do I get the offset result from "-trim"?
Bob Friesenhahn <[email protected]> Tue, 8 Sep 2020 09:02:38 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 8 Sep 2020, Adam Richter wrote: > Hi, Bob. > > I have found the "-trim -fuzz ..." discrepancy between ImageMagick and > GraphicsMagick. > > I suspect that this was a change that someone put into ImageMagic, and > I recommend you follow this one. In particular, in color.c, in > FuzzyColorMatch(), I recommend that you multiply fuzz_squared by 3.0, > which ImageMagick does. Basically, fuzz is supposed to be a value Interesting. I have not updated this function significantly since 2008 when an optimization was added. The function is used in many (22!) places. Looking closer, it seems that there is ample opportunity for possible speed-up as well. Unless the user knows what they are doing (unlikely), the results of the distance vector are not likely to be very useful because they are performed in an inadequate color-space. In many cases the user can not "fix" FuzzyColorMatch() without breaking something else because it is called deep in the bowels of other algorithms. > If you would prefer I generate a proposed patch and email it to you > (or submit it my whatever other mechanism you prefer, such a merge > request, etc.), please just let me know. I am happy to do so. A simple emailed text patch would be great. If there is a SourceForge problem report, then a text patch attached to the problem report will work as well. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt