L_WiaAcquireImageFromVideo

Summary

Extracts a still image from the video stream, and saves the image as a JPEG file.

Syntax

#include "ltwia.h"

L_LTWIA_API L_INT EXT_FUNCTION L_WiaAcquireImageFromVideo(hSession, pszFileName, puLength)

Parameters

HWIASESSION hSession

Handle to an existing WIA session. This handle is obtained by calling the L_WiaInitSession function.

L_TCHAR* pszFileName

Receives the full path and filename of the JPEG file that this method creates.

L_SIZE_T* puLength

Pointer to a variable that contains the user allocated string buffer length. This parameter will always be updated with the exact required string buffer length.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This feature is available in version 16 or higher.

To retrieve the required string buffer length, declare a variable of type L_SIZE_T and pass the address of that variable to this function and also pass NULL for the pszFileName parameter. Then you can use the returned buffer length to allocate your string buffer with the exact required buffer length. But still this function will save the image to the images directory in this case.

Required DLLs and Libraries

Platforms

Since WIA does not support video devices in Windows Server 2003, Windows Vista or later, then this function will only work with Windows XP or earlier operating systems.

See Also

Functions

Topics

Example

For an example, refer to L_WiaIsVideoPreviewAvailable.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS WIA C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.