GNOME Bugzilla – Bug 147481
new dither function (Riemersma)
Last modified: 2007-12-11 01:54:27 UTC
Those are two enhancement to gimp. colormetric.patch: Revised the idea of color distance based on a paper by Thiadmer Riemersma (http://www.compuphase.com/cmetric.htm). Now RGB->INDEXED does not map dark colors to blue or light grays to yellow. riemersmadither.patch: Created a new dither option based on a paper by Thiadmer Riemersma (http://www.compuphase.com/riemer.htm). This algorithm combines the advantages of ordered dither and error diffusion dither.
Created attachment 29505 [details] [review] colormetric patch
Created attachment 29506 [details] [review] riemersma dither addition
Interesting. Thanks for your efforts. Unfortunately we do no longer maintain the 1.2.x branch of the GIMP. It would be awesome if you could adjust your patches for the current CVS version of the gimp, which will result in a 2.2 release relatively soon. (This is no promise of inclusion though)
There's a simple rule for bugzilla and that is to file a separate bug-report for each issue you want to address. In this case however I think we can just drop the first patch since the code in 2.0 has been completely redone and now calculates color distances in a perceptual color-space. Your patch should be obsoleted by that work. Changing the summary accordingly...
Comment on attachment 29505 [details] [review] colormetric patch obsoleted by changes in gimp 2.0
Comment on attachment 29506 [details] [review] riemersma dither addition this patch needs to be updated for current CVS and it needs to be changed to follow the GIMP coding style
Adding Adam to the Cc: since I'd like him to comment on the proposed dither routine.
I tried out the Riemersma dither a long time ago (I thought this was already in bugzilla... maybe it was just on the mailing list). I've only tried it on gimp 1.2. Overall I think it's probably better than the existing ordered/positioned dither. Although it's sadly a lot more prone to artifacts, it doesn't mess with contrast so much (particularly since GIMP 1.2's ordered dither has some design flaws). n.b. I don't remember whether GIMP 2.0's ordered dither has further improvements and fixes beyond operating in perceptual space, so I can't say whether Riemersma would be an advantage there, depite that being the question. Sorry.
Oh, silly me, Riemersma isn't a positional dither, it's a diffusion dither with fairly good error localisation. That does make it an interesting hybid, but it isn't quite a drop-in replacement for the existing positional dither.
As fas as I understood, the new dither routine is meant as an additional option. Even though I don't favor adding too many options, adding another dither routine would certainly not hurt.
The only reason I'd think about replacing an existing dither with this one would be that too many indistinguishable dither options bloat the code and confuse the user. However, I think it's fair to say that (almost) all of the dither options currently allowed, including Riemersma, have quite distinct effects and usages -- I have no idea how obvious this is from docs/help though!
(Hm, this prompted me to improve the existing positional dither's algorithm. It's somewhat better now. The work was done for gimp 1.2 but should forward-port moderately easily. Does the GIMP project in some fashion own any machines I could ssh to for GIMP 2.x development? My own machine isn't up to the task for various reasons.)
The GIMP project doesn't own any machines but I could probably get you an account on a reasonably fast machine on a slow (but still reasonable) internet connection.
I am going to resolve this bug report as OBSOLETE because everything here has become useless for the current version of GIMP. Anybody who wants to follow up on this is welcome to open a new bug report.