ExtractColorArrayFromRegion Data Member Function

Populates the destination array with the data in the source <Image> object. If the destination array does not have sufficient memory, an allocation will occur. This can be thought of as 'packing' the destination array object with the contents of the source <Image> object. If the source <Image> object has more bytes than the destination array object, then the destination array object may contain truncated values depending on how the size of the destination array object aligns with the size of the source <Image> object. If the source <Image> object has fewer bytes than the destination array object, any remaining elements in the array object will retain their original values. Finally, data is deep copied, which means the memory in the source <Image> object remains unchanged and there is no memory ownership transfer or change. Non-zero indicates success, zero indicates failure.

Prototype

int32 ExtractColorArrayFromRegion( ColorArray p_oDest, Image p_oSource, int32 p_nStartIndex, int32 p_nCountInBytes )

Parameters

Parameter Type Parameter Name Documentation
<ColorArray>p_oDestA pointer to the destination array object.
<Image>p_oSourceA pointer to the source <Image> object.
int32p_nStartIndexThe start index in the source <Image> object, in byte coordinates such as 0, 1, 2, 512, at which to start copying data.
int32p_nCountInBytesThe number of bytes to copy from the source <Image> object to the destination array object.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.