diff options
author | pajoye <none@none> | 2007-12-31 00:58:38 +0000 |
---|---|---|
committer | pajoye <none@none> | 2007-12-31 00:58:38 +0000 |
commit | 346dea25e1ec92323e12d8c147afaf87e44868c1 (patch) | |
tree | 1b87620bcfda4846f4b480f83ae155dfefce77fa /src/gd_nnquant.h | |
parent | 176627adf36a2070d216dc9921fdd3fea3f596e4 (diff) | |
download | libgd-346dea25e1ec92323e12d8c147afaf87e44868c1.tar.gz |
- #58, Add new dithering alogirthm based on nthony Dekker's neuquant
algorithm using http://pngnq.sourceforge.net/ with alpha support
Diffstat (limited to 'src/gd_nnquant.h')
-rw-r--r-- | src/gd_nnquant.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gd_nnquant.h b/src/gd_nnquant.h new file mode 100644 index 0000000..d19d7cf --- /dev/null +++ b/src/gd_nnquant.h @@ -0,0 +1,19 @@ + +/* maximum number of colours that can be used. + actual number is now passed to initcolors */ +#define MAXNETSIZE 256 + +/* For 256 colours, fixed arrays need 8kb, plus space for the image + ---------------------------------------------------------------- */ + + +/* four primes near 500 - assume no image has a length so large */ +/* that it is divisible by all four primes */ +#define prime1 499 +#define prime2 491 +#define prime3 487 +#define prime4 503 + +#define minpicturebytes (4*prime4) /* minimum size for input image */ + + |