GMImage.SetIsValid
------------------

Sets whether the object contain a valid image.

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

MBS( "GMImage.SetIsValid"; ImageRef; Flag ) 

**MBS**( **"GMImage.SetIsValid";** /\* Sets whether the object contain a valid image. \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$Flag**) /\* A boolean value.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |
| Flag | A boolean value. | 1 |

### Result

Returns "OK" on success.

### Description

Sets whether the object contain a valid image.  
### See also

- [GMImage.GetIsValid](GMImageGetIsValid.md)
- [GMImage.SetQuality](GMImageSetQuality.md)

This function checks for a license.

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

  
[GMImage.SetInterlaceType](GMImageSetInterlaceType.md) - [GMImage.SetLabel](GMImageSetLabel.md)

[HTML Version](GMImageSetIsValid.shtml)