This project is read-only.

Handle Alpha gradations


I tried to test nQuant on this image:
The results were not good (see attached image). The alpha channel presents discontinuities.
If you check the resulting image in a editor tool, and display channels one by one, you can see that the R, G, B channels are fine, but not the Alpha channel.
Maybe I'm just missing a setting though, I'm, using the default settings in nQuant.exe:
        private static int alphaTransparency = 10;
        private static int alphaFader = 70;

file attachments


wil_ wrote Oct 30, 2013 at 2:56 AM

So I spent a bit more time reading the previous comments and the details you provided on your blog about your additions to Xiaolin Wu's algorithm to add support for Alpha channel.
I used the following settings:
        private static int alphaTransparency = 0;
        private static int alphaFader = 1;
And my converted image looked much better:

So this is not an issue any more. By the way, good work!