GMImage.SetQuantizeColors
-------------------------

Sets the Maximum number of colors to quantize to

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [GraphicsMagick](component_GraphicsMagick.md) | [2.0](newinversion20.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "GMImage.SetQuantizeColors"; ImageRef; Colors ) 

**MBS**( **"GMImage.SetQuantizeColors";** /\* Sets the Maximum number of colors to quantize to \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$Colors**) /\* Maximum number of colors to quantize toe.g. 10 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |
| Colors | Maximum number of colors to quantize to | 10 |

### Result

Returns "OK" on success.

### Description

Sets the Maximum number of colors to quantize to  
### See also

- [GMImage.GetQuantizeColors](GMImageGetQuantizeColors.md)
- [GMImage.GetQuantizeColorSpace](GMImageGetQuantizeColorSpace.md)
- [GMImage.GetQuantizeDither](GMImageGetQuantizeDither.md)
- [GMImage.Quantize](GMImageQuantize.md)
- [GMImage.SetMatteColor](GMImageSetMatteColor.md)
- [GMImage.SetQuantizeColorSpace](GMImageSetQuantizeColorSpace.md)
- [GMImage.SetQuantizeDither](GMImageSetQuantizeDither.md)

### Example Databases

- [GraphicsMagick/GraphicsMagick Sample](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/GraphicsMagick/GraphicsMagick%20Sample.shtml#17ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[GMImage.SetQuantizeColorSpace](GMImageSetQuantizeColorSpace.md) - [GMImage.SetQuantizeDither](GMImageSetQuantizeDither.md)

[HTML Version](GMImageSetQuantizeColors.shtml)