2
Vote

Handle Alpha gradations

description

I tried to test nQuant on this image:
Image
The results were not good (see attached image). The alpha channel presents discontinuities.
Image
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

comments

wil_ wrote Oct 30, 2013 at 1: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:
Image

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