|
|
|
|
|
dTransferToImage (Function) In french: dTransfertVersImage Creates an image from a buffer of pixels encoded in a specific format. This function is an advanced function. This function is mainly used to handle the images returned by external APIs via Image variables.
// Summary: Method to implement to store the received frame // Syntax: //__FrameSave (<nFrameNumber> is int, <stLock> is NUI_LOCKED_RECT, // <nImageType> is int, <nResolution> is int) // // Parameters: // nFrameNumber (integer): Number of the frame // stLock (NUI_LOCKED_RECT): Data of the frame // nImageType (integer): Type of image // nResolution (integer): Image resolution  VIRTUAL PROTECTED procedure __FrameSave(LOCAL nFrameNumber is <useful> int, ... LOCAL stLock is NUI_LOCKED_RECT, local nImageType is <useful> int, ... LOCAL nResolution is <useful> int)  nWidth is unsigned int nHeight is unsigned int NuiImageResolutionToSize(nResolution, nWidth, nHeight)  // Stores the data Transfer(&m_arrData, stLock.pBits, stLock.size)  SWITCH nImageType // RVB CASE NUI_IMAGE_TYPE_COLOR  // Transfers the pixels into the image m_Pool = dTransferToImage(stLock.pBits, imgBVR32, nWidth, nHeight)  OTHER CASE  // Not supported END  // Draw the FPS __DrawingFPS(m_Pool)
Syntax
<Result> = dTransferToImage(<Pointer> , <Type> , <Width> , <Height>)
<Result>: Image variable Name of Image variable containing the image created from the buffer. An invalid image is returned if an error occurred. <Pointer>: Address Address of the buffer containing the pixels to load. <Type>: Integer constant Type of buffer used: | | imgBGR32 | Image in 32-bit Blue Green Red format without alpha layer. | imgBGR | Image in 24-bit Blue Green Red format. | imgBGRA | Image in 32-bit Blue Green Red format with alpha channel. | imgRGB32 | Image in 32-bit Red Green Blue format without alpha channel. |
<Width>: Integer Width of image. <Height>: Integer Height of image. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|