Routines (alphabetical) > Object Classes > Graphics Object Classes > IDLgrImage::SetProperty

# IDLgrImage::SetProperty

Syntax | Arguments | Keywords | Version History

The IDLgrImage::SetProperty procedure method sets the value of the property or group of properties for the image.

## Syntax

Obj->[IDLgrImage::]SetProperty[, PROPERTY=value] [, /NO_COPY]

## Arguments

None

## Keywords

Any property listed under IDLgrImage Properties that contains the word “Yes” in the “Set” column of the properties table can be set using this method. To set the value of a property, specify the property name as a keyword set equal to the appropriate property value.

### NO_COPY

If this keyword is set to a non-zero value, and the DATA property is specified in the same invocation, it relocates the image data from the input variable to the image object, leaving the input DATA property variable undefined. Only the DATA property is affected. The following example illustrates that the data is moved from the input variable.

imgdata = BYTSCL(DIST(300))

oImg = OBJ_NEW('IDLgrImage')

oImg->SetProperty, DATA=imgdata, /NO_COPY

HELP, imgdata

; IDL prints IMGDATA UNDEFINED = <Undefined>

If this keyword is omitted, the input image data will be duplicated and a copy will be stored in the object.

## Version History

5.0 | Introduced
6.2 | Added NO_COPY keyword