After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 147481 - new dither function (Riemersma)
new dither function (Riemersma)
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: General
1.x
Other All
: Normal enhancement
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-07-13 13:17 UTC by Bruno Redondi
Modified: 2007-12-11 01:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
colormetric patch (8.81 KB, patch)
2004-07-13 13:18 UTC, Bruno Redondi
none Details | Review
riemersma dither addition (17.63 KB, patch)
2004-07-13 13:19 UTC, Bruno Redondi
needs-work Details | Review

Description Bruno Redondi 2004-07-13 13:17:00 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.
Comment 1 Bruno Redondi 2004-07-13 13:18:19 UTC
Created attachment 29505 [details] [review]
colormetric patch
Comment 2 Bruno Redondi 2004-07-13 13:19:15 UTC
Created attachment 29506 [details] [review]
riemersma dither addition
Comment 3 Simon Budig 2004-07-13 13:38:50 UTC
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)
Comment 4 Sven Neumann 2004-07-13 13:43:10 UTC
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 5 Sven Neumann 2004-07-13 13:43:45 UTC
Comment on attachment 29505 [details] [review]
colormetric patch

obsoleted by changes in gimp 2.0
Comment 6 Sven Neumann 2004-07-13 13:44:49 UTC
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
Comment 7 Sven Neumann 2004-07-13 13:47:45 UTC
Adding Adam to the Cc: since I'd like him to comment on the proposed dither routine.
Comment 8 Adam D. Moss 2004-07-14 09:09:37 UTC
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.
Comment 9 Adam D. Moss 2004-07-14 10:19:10 UTC
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.

Comment 10 Sven Neumann 2004-07-14 10:33:28 UTC
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.
Comment 11 Adam D. Moss 2004-07-14 10:41:15 UTC
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!
Comment 12 Adam D. Moss 2004-07-14 16:25:21 UTC
(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.)
Comment 13 Sven Neumann 2004-07-14 16:52:11 UTC
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.
Comment 14 weskaggs 2007-12-11 01:54:27 UTC
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.