diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2016-09-21 13:52:26 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2016-09-21 14:14:27 +0200 |
commit | 25e18ebce89766558a75345e91d13b7732a4a9a5 (patch) | |
tree | 307819921aa8cc98621aa96024a2d61e26061379 /src/gd.h | |
parent | 408ea5e5c3cceb0335c58aaf5ff98f7fc063fa4c (diff) | |
download | libgd-25e18ebce89766558a75345e91d13b7732a4a9a5.tar.gz |
Improve documentation of truecolor to palette conversion
Diffstat (limited to 'src/gd.h')
-rw-r--r-- | src/gd.h | 29 |
1 files changed, 25 insertions, 4 deletions
@@ -227,14 +227,35 @@ extern "C" { BGD_DECLARE(int) gdAlphaBlend (int dest, int src); BGD_DECLARE(int) gdLayerOverlay (int dest, int src); BGD_DECLARE(int) gdLayerMultiply (int dest, int src); - + + +/** + * Group: Color Quantization + * + * Enum: gdPaletteQuantizationMethod + * + * Constants: + * GD_QUANT_DEFAULT - The default quantization method. + * GD_QUANT_JQUANT - libjpeg's old median cut. Fast, but only uses 16-bit + * color. + * GD_QUANT_NEUQUANT - NeuQuant - approximation using Kohonen neural network. + * GD_QUANT_LIQ - A combination of algorithms used in libimagequant + * aiming for the highest quality at cost of speed. + * + * Note that GD_QUANT_JQUANT does not retain the alpha channel, and + * GD_QUANT_DEFAULT only does so if libimagequant is available. + * + * See also: + * - <gdImageTrueColorToPaletteSetMethod> + */ enum gdPaletteQuantizationMethod { GD_QUANT_DEFAULT = 0, - GD_QUANT_JQUANT = 1, /* libjpeg's old median cut. Fast, but only uses 16-bit color. */ - GD_QUANT_NEUQUANT = 2, /* neuquant - approximation using kohonen neural network. */ - GD_QUANT_LIQ = 3 /* combination of algorithms used in libimagequant/pngquant2 aiming for highest quality at cost of speed */ + GD_QUANT_JQUANT = 1, + GD_QUANT_NEUQUANT = 2, + GD_QUANT_LIQ = 3 }; + /** * Group: Transform * |