PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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:
imgBGRImage in 24-bit Blue Green Red format.
imgBGR32Image in 32-bit Blue Green Red format without alpha layer.
imgBGRAImage in 32-bit Blue Green Red format with alpha layer.
imgRGB32Image in 32-bit Red Green Blue format without alpha layer.
<Width>: Integer
Width of image.
<Height>: Integer
Height of image.
Components
WINDEVReports and Queries wd230pnt.dll
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment