GetPixel (Image)

Description

Returns the color of the image at a particular coordinate. The value "0,0" represents the bottom left pixel of the image. Bilinear interpolation is used to determine sub-pixel values.

 

Scripting Syntax

Image.GetPixel( X, Y )

C# Syntax

Color Image.GetPixel( Double in_dX, Double in_dY );

Parameters

Parameter

Type

Description

X

Double

X coordinate on the image.

Y

Double

Y coordinate on the image.

Return Value

The normalized Color of the image at the given coordinate

Examples

VBScript Example

' Replace with your bitmap path
CreateImageClip "$SI_HOME\Data\XSI_SAMPLES\Pictures\jio.jpg"
SelectObj "Clips.jio_jpg"
set oImageClip = Selection(0)

set oImage = oImageClip.GetImage()

set oPixelColor = oImage.GetPixel (0 , 0)

LogMessage "The pixel color is:"
LogMessage "R: " & oPixelColor.Red
LogMessage "G: " & oPixelColor.Green
LogMessage "B: " & oPixelColor.Blue
LogMessage "A: " & oPixelColor.Alpha


SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index