# gdImageNeuQuant

> gdImagePtr gdImageNeuQuant( |  | gdImagePtr | im,
> | const | int | max_color,
> |  | int | sample_factor | )

Creates a new palette image from a truecolor image

This is the same as calling gdImageCreatePaletteFromTrueColor with the quantization method GD_QUANT_NEUQUANT.

#### Parameters

im | The image.
max_color | The number of desired palette entries.
sample_factor | The quantization precision between 1 (highest quality) and 10 (fastest).

#### Returns

A newly create palette image; NULL on failure.

> gdImagePtr gdImageCreatePaletteFromTrueColor ( | gdImagePtr | im,
> | int | dither,
> | int | colorsWanted | )

Creates a new palette image from a truecolor image
NeuQuant - approximation using Kohonen neural network.
Close