GMImage.MedianFilter
--------------------

Filter image by replacing each pixel component with the median color in a circular neighborhood.

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

MBS( "GMImage.MedianFilter"; ImageRef; Radius ) 

**MBS**( **"GMImage.MedianFilter";** /\* Filter image by replacing each pixel component with the median color in a circular neighborhood. \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$Radius**) /\* The radius.e.g. 0.0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |
| Radius | The radius. | 0.0 |

### Result

Returns "OK" on success.

### Description

Filter image by replacing each pixel component with the median color in a circular neighborhood.  
This function checks for a license.

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

  
[GMImage.MeanErrorPerPixel](GMImageMeanErrorPerPixel.md) - [GMImage.Minify](GMImageMinify.md)

[HTML Version](GMImageMedianFilter.shtml)