GMImage.Resize
--------------

Resize image, specifying geometry, filter, and blur.

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

MBS( "GMImage.Resize"; ImageRef; Geometry { ; FilterTypes; Blur } ) 

**MBS**( **"GMImage.Resize";** /\* Resize image, specifying geometry, filter, and blur. \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$Geometry**; /\* The rectangle to use.   
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" \*/   
**$FilterTypes**; /\* Optional; Which filter to use.  
Can be one of Undefined, Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, or Sinc.e.g. "Cubic" \*/   
**$Blur**) /\* Optional; The blur radius.  
Only used if filter is specified.e.g. 3 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ImageRef | The image reference number. | 1 |  |
| Geometry | The rectangle to use.    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" |  |
| FilterTypes | Which filter to use.   Can be one of Undefined, Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, or Sinc. | "Cubic" | Optional |
| Blur | The blur radius.   Only used if filter is specified. | 3 | Optional |

### Result

Returns OK or error.

### Description

Resize image, specifying geometry, filter, and blur.  
If filter or blur is not specified, we use image defaults.  
### Examples

Resize image to 1000x1000 with cubic filter:

 Set Variable \[ $BigImageRef ; Value: MBS ("[GMImage.NewFromContainer](GMImageNewFromContainer.md)"; Test::BigImage ) \]   
Set Variable \[ $Result ; Value: MBS ("GMImage.Resize"; $BigImageRef ; "1000x1000"; "Cubic"; 0) \]   
Set Field \[ Test::Result ; MBS ( "[GMImage.WriteToPNGContainer](GMImageWriteToPNGContainer.md)"; $BigImageRef ; "test.png" ) \]   
Set Variable \[ $Error ; Value: MBS ("[GMImage.Release](GMImageRelease.md)";$BigImageRef ) \]  
### See also

- [GMImage.Affine](GMImageAffine.md)
- [GMImage.Describe](GMImageDescribe.md)
- [GMImage.GetSize](GMImageGetSize.md)
- [GMImage.Negate](GMImageNegate.md)
- [GMImage.NewFromContainer](GMImageNewFromContainer.md)
- [GMImage.Raise](GMImageRaise.md)
- [GMImage.Repage](GMImageRepage.md)
- [GMImage.Rotate](GMImageRotate.md)
- [GMImage.SetSize](GMImageSetSize.md)
- [GMImage.WriteToPNGContainer](GMImageWriteToPNGContainer.md)

### Release notes

- **Version 9.0**
    - Added [GMImage.AutoOrient](http://www.mbsplugins.eu/GMImageAutoOrient.shtml), [GMImage.Extent](http://www.mbsplugins.eu/GMImageExtent.shtml), [GMImage.GetQuiet](http://www.mbsplugins.eu/GMImageGetQuiet.shtml), [GMImage.Repage](http://www.mbsplugins.eu/GMImageRepage.shtml), [GMImage.Resize](http://www.mbsplugins.eu/GMImageResize.shtml) and [GMImage.SetQuiet](http://www.mbsplugins.eu/GMImageSetQuiet.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 9.0pr6](https://www.mbsplugins.de/archive/2019-01-02/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 28th December 2018 , last changed 13th May 2019

  
[GMImage.ReplaceColor](GMImageReplaceColor.md) - [GMImage.Roll](GMImageRoll.md)

[HTML Version](GMImageResize.shtml)