[magick-developers] about ImageMagick's dithering on a Hilbert-Peano curve

Anthony Thyssen anthony at griffith.edu.au
Sat Aug 9 04:23:53 PDT 2008


Sam Hocevar on  wrote...
| On Fri, Aug 08, 2008, Anthony Thyssen wrote:
| > The most important thing being that a remainer method of distribution be
| > used, so that any integer rounding is taken into account.  Your patch
| > does not seem to take that into account. though that is also probably
| > easily fixed.
| 
|    Yes. I was wary of propagating 100% of the error because I did not
| know how the quantiser would react (I have seen ImageMagick choose weird
| colours when dealing with restrictive palettes). But after thinking more
| about it, I think it would do no harm. I'll update the patch.
| 
from the DHALF.TXT document...

=======8<--------
Special considerations

...

With all of these filters, it is also important to ensure that the sum of
the distributed error values is equal to the original error value.  This is
most easily accomplished by subtracting each fraction, as it is calculated,
from the whole error value, and using the final remainder as the last
fraction.  
=======8<--------

  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 -----------------------------------------------------------------------------
    "Magic is Real -- unless declared an integer"  ---  John P.Melvin
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


More information about the Magick-developers mailing list