GMImage.SetSubImage
-------------------

Selects which image of an image sequence is currently used.

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

MBS( "GMImage.SetSubImage"; ImageRef; Value ) 

**MBS**( **"GMImage.SetSubImage";** /\* Selects which image of an image sequence is currently used. \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$Value**) /\* the new indexe.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |
| Value | the new index | 0 |

### Result

Returns "OK" on success.

### Description

Selects which image of an image sequence is currently used.  
### See also

- [GMImage.GetSubImage](GMImageGetSubImage.md)
- [GMImage.GetSubRange](GMImageGetSubRange.md)
- [GMImage.SetSubRange](GMImageSetSubRange.md)

This function checks for a license.

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

  
[GMImage.SetStrokeWidth](GMImageSetStrokeWidth.md) - [GMImage.SetSubRange](GMImageSetSubRange.md)

[HTML Version](GMImageSetSubImage.shtml)