Extracts a channel of the source <Image> object to 8I ( raw <uint8> ) and stores the results in the destination array. This function is not type safe. Ex: if you extract a set of bytes from a <Float32Array>, you can't necessarily use them as colors. Note that the bytes can be re-packed into a floating point texture with no problem.
int32 Extract8IRaw( Image p_oSource, int32 p_eChannel, Uint8Array p_abDest )
Parameter Type | Parameter Name | Documentation |
---|---|---|
<Image> | p_oSource | A pointer to the source <Image> object. |
int32 | p_eChannel | The channel of the <Image> to extract. Refers to the ImageChannel enumeration. Please see TYPE_SERVICE_ENUMERATION_UTIL.SSL in the application scripts folder for more information. |
<Uint8Array> | p_abDest | A pointer to the destination array. You can pass in a non-nullptr, empty array, and this function will allocate storage ( once ). Allocation assumes that you wish to allocate enough storage to store all the data in the source <Image> object. |
None published. Please look for an example in the Scenome Scripting Language code base.