Home | Sign in | English EN
  • Save as image
  • Use conditions:
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Saves the video currently transmitted by a "camera" as an image or a video sequence.
The video save formats are:
  • WINDEVWindows an image in BMP format or a video sequence in AVI format.
    If the file extension is .jpg or .jpeg, the image is saved in JPEG format
WINDEVUser code (UMC)
// Save the video transmitted in the "CAM_Kitchen" control
// in the format of a 1-minute AVI ("C:\Temp\MyVideo.AVI")
ResSave = VideoCapture(CAM_Kitchen, "C:\Temp\MyVideo.AVI", viVideoCapture, 60)
IF ResSave = True THEN
Info("Video successfully saved")
<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 successfully saved,
  • 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 in order to save it.
<File to create>: Character string
Name and full (or relative) path of file to create.
WINDEVWindows If an image is saved, a BMP file is created. If a video sequence is saved, an AVI file is created.
Caution: No UNC path can be used.
<Type of capture>: Optional integer constant
Type of capture:
WINDEVWindows Capture an image in the format of a BMP file.

(Default value)
WINDEVWindows Capture a video sequence in the format of an AVI file.

<Capture duration>: Optional integer
Duration of capture (in seconds). If this parameter is set to 0 or if it is not specified, the capture will stop:
  • during the call to VideoStop.
  • when the specified disk is full.
This parameter can correspond to:
  • an integer corresponding to the number of seconds,
  • a Duration variable,
  • Versions 23 and later
    the duration in a readable format (e.g., 1 s or 10 ms).
    New in version 23
    the duration in a readable format (e.g., 1 s or 10 ms).
    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 currently transmitted must be viewed in the specified Camera control,
  • False otherwise.

Save as image

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 image will be saved in BMP format.
  • the dSaveImageGIF function: the image will be saved in GIF format.
  • the dSaveImageJPEG function: the image will be saved in JPEG format.

Use conditions:

  • WINDEVWindows To use this function, a "web camera" must be connected to the current computer.
Versions 22 and later
Remark: This function is equivalent to CameraCapture.
New in version 22
Remark: This function is equivalent to CameraCapture.
Remark: This function is equivalent to CameraCapture.
Related Examples:
The Camera functions 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.
WM System 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:
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- Vibration
- Notifications
- Drawing functions
- Internet
Component: wd270obj.dll
Minimum version required
  • Version 9
This page is also available for…
vou mostrar como tirar uma foto
Trace("Aguarde..Tirando Foto")
b_salvar_imagen is boolean = VideoCapture(CAM_FOTO,"imagentemp.jpeg",viPictureCapture,2)
IF b_salvar_imagen=True THEN

// blog com vídeo e exemplo


De matos
15 Jul. 2017