GMImage.Map
-----------

Remap image colors with closest color from reference image.

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

MBS( "GMImage.Map"; ImageRef; mapImage { ; dither } ) 

**MBS**( **"GMImage.Map";** /\* Remap image colors with closest color from reference image. \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$mapImage**; /\* The image reference number.e.g. 2 \*/   
**$dither**) /\* Optional; Optional, a boolean whether to dither.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ImageRef | The image reference number. | 1 |  |
| mapImage | The image reference number. | 2 |  |
| dither | Optional, a boolean whether to dither. | 0 | Optional |

### Result

Returns "OK" on success.

### Description

Remap image colors with closest color from reference image.  
### See also

- [GMImage.Chop](GMImageChop.md)
- [GMImage.Copy](GMImageCopy.md)
- [GMImage.Crop](GMImageCrop.md)
- [GMImage.Flip](GMImageFlip.md)
- [GMImage.Flop](GMImageFlop.md)
- [GMImage.Hash](GMImageHash.md)
- [GMImage.New](GMImageNew.md)
- [GMImage.Read](GMImageRead.md)
- [GMImage.Wave](GMImageWave.md)

This function checks for a license.

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

  
[GMImage.Magnify](GMImageMagnify.md) - [GMImage.MatteFloodfill](GMImageMatteFloodfill.md)

[HTML Version](GMImageMap.shtml)