ImageClip.GetScaledDownImage

Introduced

v4.0

Description

This method is identical to ImageClip.GetImage, except that it returns a scaled-down version of the image. This can be a major performance enhancement if the source image is very large but where full resolution is not important: for example, when generating a thumbnail.

Note: the user preferences preferences.rendering.maximum_proxy_level and preferences.rendering.minimum_proxy_size can influence the results of this call. The image returned may be larger than requested.

C# Syntax

Image ImageClip.GetScaledDownImage( siImageRatio in_Ratio, Object in_vFrame );

Scripting Syntax

oReturn = ImageClip.GetScaledDownImage( Ratio, [Variant] );

Return Value

Image

Parameters

Parameter Type Description
Ratio siImageRatio Ratio value which defines how much the image should be reduced
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

JScript Example

var factoryImages = Application.InstallationPath(siFactoryPath) + 
			"/Data/XSI_SAMPLES/Pictures/"	
	var strImagePath = factoryImages + "jio.jpg" ;
	var oImageClip = CreateImageClip( strImagePath, "ScalingClip" ) ;
	var oImage = oImageClip.GetScaledDownImage( siImageRatio1x1 ) ;
	LogMessage( "Full res image is " + oImage.ResX + "x" + oImage.ResY ) ;
	oClip = oImageClip.GetScaledDownImage( siImageRatio2x1 ) ;
	LogMessage( "2:1 image is " + oImage.ResX + "x" + oImage.ResY ) ;
	oClip = oImageClip.GetScaledDownImage( siImageRatio4x1 ) ;
	LogMessage( "4:1 image is " + oImage.ResX + "x" + oImage.ResY ) ;
	oClip = oImageClip.GetScaledDownImage( siImageRatio8x1 ) ;
	LogMessage( "8:1 image is " + oImage.ResX + "x" + oImage.ResY ) ;
	oClip = oImageClip.GetScaledDownImage( siImageRatio16x1 ) ;
	LogMessage( "16:1 image is " + oImage.ResX + "x" + oImage.ResY ) ;
	oClip = oImageClip.GetScaledDownImage( siImageRatioThumbnail ) ;
	LogMessage( "Thumbnail image is " + oImage.ResX + "x" + oImage.ResY ) ;