GMImage.Shave
-------------

Shave pixels from image edges.

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

MBS( "GMImage.Shave"; ImageRef; Geometry ) 

**MBS**( **"GMImage.Shave";** /\* Shave pixels from image edges. \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$Geometry**) /\* The rectangle where to draw. Geometry is specified as a width and height "100x200". With an optional offset "100x200+10+20". For percent values, add a percent on the end, for % values add a %: "100x200%!"e.g. "100x200" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |
| Geometry | The rectangle where to draw. Geometry is specified as a width and height "100x200". With an optional offset "100x200+10+20". For percent values, add a percent on the end, for % values add a %: "100x200%!" | "100x200" |

### Result

Returns "OK" on success.

### Description

Shave pixels from image edges.  
### Examples

Shaves an image:

 Let ( \[   
$Image = MBS ("[GMImage.NewFromContainer](GMImageNewFromContainer.md)"; GraphicsMagick::image );   
$ShaveResult = MBS ("GMImage.Shave";$Image ; "10x10");   
$Result = MBS ("[GMImage.WriteToPNGContainer](GMImageWriteToPNGContainer.md)"; $Image );   
$Error = MBS ("[GMImage.Release](GMImageRelease.md)";$Image )  
\];   
$Result )  
### See also

- [GMImage.Erase](GMImageErase.md)
- [GMImage.Frame](GMImageFrame.md)
- [GMImage.New](GMImageNew.md)
- [GMImage.NewFromContainer](GMImageNewFromContainer.md)
- [GMImage.Release](GMImageRelease.md)
- [GMImage.Scale](GMImageScale.md)
- [GMImage.Shade](GMImageShade.md)
- [GMImage.Sharpen](GMImageSharpen.md)
- [GMImage.Shear](GMImageShear.md)
- [GMImage.WriteToPNGContainer](GMImageWriteToPNGContainer.md)

### Example Databases

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

This function checks for a license.

Created 18th August 2014 , last changed 21st December 2018

  
[GMImage.SharpenChannel](GMImageSharpenChannel.md) - [GMImage.Shear](GMImageShear.md)

[HTML Version](GMImageShave.shtml)