|
|
|
|
dTransferToImage (Función) Crea una imagen a partir de un bufffer de pixeles codificado en un formato específico. Esta función es avanzada. Esta función se utiliza principalmente para manipular imágenes devueltas por las API externas a través de variables de tipo Image.
// 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)
Sintaxis
<Result> = dTransferToImage(<Pointer> , <Type> , <Width> , <Height>)
<Result>: Variable de tipo Image Nombre de la variable Image que contiene la imagen creada a partir del buffer. Si se produce un error, se devuelve una imagen no válida.. <Pointer>: Dirección Dirección del buffer que contiene los pixeles a cargar. <Type>: Constante de tipo Integer Tipo de buffer utilizado: | | imgBGR32 | Imagen en formato Azul Verde Rojo de 32 bits sin canal alfa. | imgBGR | Imagen en formato Azul Verde Rojo de 24 bits. | imgBGRA | Imagen en formato Azul Verde Rojo de 32 bits con canal alfa. | imgRGB32 | Imagen en formato Rojo Verde Azul de 32 bits sin canal alfa. |
<Width>: Entero Ancho de la imagen. <Height>: Entero Alto de la imagen. Clasificación Lógica de negocio / UI: Código neutro
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|