- Saving a photo
- Use conditions:
- Required permissions
VideoCapture (Function) In french: VidéoCapture Captures the images received from the camera: - as an image: takes a photo.
- as a video: records a video.
Warning
Starting with version 27, this function is deprecated for Android and iOS applications. This function is kept only for Camera controls created with earlier versions and with the "Version-26-compatible mode" option enabled ("General" tab of the control description window).
Depending on the platform, the following photo and video formats are used:  BMP images or AVI videos. If the file extension is .jpg or .jpeg, the image is saved in JPEG format JPEG images or videos. The format and quality of the video depend on the default device settings and may differ from one device to another. JPEG images or videos. The format and quality of the video depend on the default device settings and may differ from one device to another.
Syntax
<Result> = VideoCapture(<Camera control> , <File to create> [, <Type of capture> [, <Capture duration> [, <Number of images per second> [, <Display during capture>]]]])
<Result>: Boolean - True if the video was recorded successfully,
- False otherwise. To get more details on the error, use ErrorInfo.
<Camera control>: Control name Name of the Camera control to be used. There is no need to display the video in a Camera control to save it. <File to create>: Character string Name and full (or relative) path of the file to create.Caution: No UNC path can be used. <Type of capture>: Optional integer constant Type of capture: | | viPictureCapture |
| viVideoCapture (Default value) |
|
<Capture duration>: Optional integer Length of the video recording (in seconds). If this parameter is set to 0 or is not specified, the video recording will stop:- when VideoStop is called.
- when there is no more space on the disk.
This parameter can be: - an integer corresponding to the number of seconds,
- a Duration variable,
- the duration in a readable format (e.g., 1 s or 10 ms).
<Number of images per second>: Optional integer Number of images saved per second (15 by default). This parameter is taken into account only if <Type of capture> is equal to viVideoCapture. <Display during capture>: Optional boolean - True (by default) if the video stream must be displayed in the specified Camera control,
- False otherwise.
Remarks Saving a photo Only the image displayed when VideoCapture is executed is saved as a BMP image. To save this image, you can also use: - the dSaveImageBMP function: the photo will be saved as a BMP file.
- the dSaveImageGIF function: the photo will be saved as a GIF file.
- the dSaveImageJPEG function: the photo will be saved as a JPEG file.
Related Examples:
|
Unit examples (WINDEV Mobile): The Camera functions
[ + ] Using the WLanguage "Camera" functions to start the native video camera application of the device in order to record a video or to take a photo.
|
|
Cross-platform examples (WINDEV Mobile): WM System
[ + ] This application is an example of some of the features of WINDEV Mobile available for Android/iOS. The following system functions are used: - NFC - Multimedia control - Brightness - Volume - Wi-Fi - Bluetooth - Toast - Compass - Accelerometer - Camera control - LED - Vibration - Notifications - Drawing functions - Internet
|
This page is also available for…
|
|
|
|