ImageClip.GetImage

Introduced

v2.0

Description

Returns the Image data associated with the clip.

Note: For performance considerations, try not only call this method when the plug-in intends to read actual pixel values. For example, you can determine the resolution more quickly via the Source object, as demonstrated in one of the examples under the main ImageClip topic.

C# Syntax

Image ImageClip.GetImage( Object in_vFrame );

Scripting Syntax

oReturn = ImageClip.GetImage( [Variant] );

Return Value

Image

Parameters

Parameter Type Description
Variant Variant Frame at which to retrieve the image. This is only meaningful when the ImageClip represents an image sequence or movie file.

Default Value: Frame corresponding to the play cursor at the time that the ImageClip instance was created.

Examples

VBScript Example

NewScene , false
set oImageClip = CreateImageClip( "$SI_HOME\Data\XSI_SAMPLES\Pictures\jio.jpg" )
set oImage = oImageClip.GetImage
dim aPixelWanted(1,3)
aPixelWanted(0,0) = 0 : aPixelWanted(1,0) = 0
aPixelWanted(0,1) = 0 : aPixelWanted(1,1) = 1
aPixelWanted(0,2) = 0 : aPixelWanted(1,2) = 2
aPixelWanted(0,3) = 0 : aPixelWanted(1,3) = 3
'Read the requested pixel values
rgba = oImage.GetPixelArray( aPixelWanted )
for i=LBound(rgba,2) to UBound(rgba,2)
		logmessage "Pixel i :" & i
	LogMessage "R :" & rgba(0,i)
	LogMessage "G :" & rgba(1,i)
	LogMessage "B :" & rgba(2,i)
	LogMessage "A :" & rgba(3,i)
next