gd_topal.c | |
Functions | |
gdImageTrueColorToPaletteSetMethod | Selects quantization method used for subsequent gdImageTrueColorToPalette calls. |
gdImageTrueColorToPaletteSetQuality | Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for. |
gdImageCreatePaletteFromTrueColor | |
gdImageTrueColorToPalette |
int gdImageTrueColorToPaletteSetMethod ( gdImagePtr im, int method, int speed )
Selects quantization method used for subsequent gdImageTrueColorToPalette calls. See gdPaletteQuantizationMethod enum (e.g. GD_QUANT_NEUQUANT, GD_QUANT_LIQ). Speed is from 1 (highest quality) to 10 (fastest). Speed 0 selects method-specific default (recommended).
Returns FALSE if the given method is invalid or not available.
void gdImageTrueColorToPaletteSetQuality ( gdImagePtr im, int min_quality, int max_quality )
Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for. Min and max quality is in range 1-100 (1 = ugly, 100 = perfect). Max must be higher than min. If palette cannot represent image with at least min_quality, then image will remain true-color. If palette can represent image with quality better than max_quality, then lower number of colors will be used. This function has effect only when GD_QUANT_LIQ method has been selected.
Selects quantization method used for subsequent gdImageTrueColorToPalette calls.
int gdImageTrueColorToPaletteSetMethod ( gdImagePtr im, int method, int speed )
Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for.
void gdImageTrueColorToPaletteSetQuality ( gdImagePtr im, int min_quality, int max_quality )
gdImagePtr gdImageCreatePaletteFromTrueColor ( gdImagePtr im, int dither, int colorsWanted )
int gdImageTrueColorToPalette ( gdImagePtr im, int dither, int colorsWanted )