ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Drawing functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
// 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:
imgBGR32Image in 32-bit Blue Green Red format without alpha layer.
imgBGRImage in 24-bit Blue Green Red format.
imgBGRAImage in 32-bit Blue Green Red format with alpha channel.
imgRGB32Image 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
Component: wd300pnt.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help