ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Video functions
  • Table of correspondences between the parameter to modify and the possible values for this parameter
  • Required permissions
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
Returns or modifies the value of a parameter for the device camera.
Warning
AndroidiPhone/iPad Starting with version 27, this function is ignored for Android and iOS applications. This function is kept only for Camera controls from earlier versions and with the "Version-26-compatible mode" option enabled ("General" tab of the control description window).
Remarks:
  • To find out the list of values supported by the camera for a given parameter, use VideoListParameter.
  • Android VideoParameter can be used in the Android emulator but not in the simulator.
Example
// Utilisation de la résolution maximale pour prendre une photo
sListeRésolution is string
sListeRésolution = VideoListParameter(vipPhotoResolution)
IF ErrorOccurred = False THEN
VideoParameter(vipPhotoResolution, ExtractString(sListeRésolution, lastRank, CR))
ELSE
Error("Erreur durant la récupération des résolutions supportées par la caméra.")
END
 
// Utilisation de la valeur maximale du zoom
sListeZoom is string
sListeZoom = VideoListParameter(vipZoom)
IF ErrorOccurred = False THEN
nZoom is int = Val(ExtractString(sListeZoom, lastRank, CR))
IF VideoParameter(vipZoom, nZoom) = False THEN
Error("La caméra ne peut pas zoomer.")
END
END
 
// Géolocalisation des photos prises par la caméra
MaPosition is géoPosition = GPSGetPosition()
VideoParameter(vipGéoPosition, MaPosition)
 
// Réglage de la sensibilité ISO
VideoParameter(vipISO, 800)
Syntax

Retrieving the value of a parameter for the device camera Hide the details

<Result> = VideoParameter(<Parameter>)
<Result>: Type of retrieved parameter
  • Parameter value,
  • Empty string ("") if the specified parameter is not supported by the camera or if an error occurred while retrieving the camera parameters.
If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo.
<Parameter>: Character String constant or character string
Parameter for which the value will be retrieved. This parameter can correspond to:
  • one of the preset constants. These constants correspond to the most common parameters.
  • a String corresponding to the name of the desired parameter.
    Caution: the parameter name is case and accent-sensitive. See the documentation about the Android SDK or about the device to find out the name of additional supported parameters. If the specified name does not correspond to a parameter supported by the camera, the function will return an empty string.
The available constants are as follows:
vipBalanceBalance mode of whites currently supported by the camera: automatic, daylight, cloudy, ...
iPhone/iPadMac Catalyst This constant is not available.
vipCameraIndex of camera currently used:
  • Subscript included between 1 and the number of cameras found on the device.
  • -1 if no camera is currently used.
vipCompressionJPEGCompression of JPEG images, corresponding to an integer included between 1 and 100.
  • 1: Maximum compression (low quality)
  • 100: No compression (very high quality)
iPhone/iPadMac Catalyst This constant is not available.
vipEffectEffect of colors currently taken into account: black and white, poster, sepia, ...
iPhone/iPadMac Catalyst This constant is not available.
vipFlashCurrent status of camera flash: automatic, without, anti red eyes, ...
vipFlickerAdjustment of flicker (anti-banding) currently used by the camera: automatic, none, 50Hz, 60Hz, ...
iPhone/iPadMac Catalyst This constant is not available.
vipFocusCurrent status of camera focus: automatic, macro, fixed, ...
iPhone/iPadMac Catalyst This constant is not available.
vipGeoPositionCurrent geolocation information: the returned value is a geoPosition variable. The following properties can be specified according to the elements supported by the camera: latitude, longitude, altitude, measurement date.
iPhone/iPadMac Catalyst This constant is not available.
vipISOISO sensibility currently used by the camera: automatic, 100, 200, 400, ...
iPhone/iPadMac Catalyst This constant is not available.
vipPhotoResolutionResolution of photos taken by the camera.
The value is returned in the following format:
<Largeur><TAB><Hauteur>
Example:
640<TAB>480
iPhone/iPadMac Catalyst This constant is not available.
vipRotationAutoAutomatic rotation of photos according to the device orientation during the capture.
  • True: the automatic rotation is enabled.
  • False: the automatic rotation is disabled.
If the automatic rotation is enabled, the photo will be saved while taking into account the orientation of the device during the capture.

The automatic rotation is enabled by default ; however, some devices do not support taking photos in portrait mode. In this case, we advise you to disable the automatic rotation and to manage the image rotation through programming.
iPhone/iPadMac Catalyst This constant is not available.
vipSceneTypes of scenes currently used by the camera: automatic, night, sports, ...
iPhone/iPadMac Catalyst This constant is not available.
vipZoomZoom value currently used by the camera.
The returned values have the following format:
  • 100 (1x zoom = no zoom)
  • 200 (2x zoom)
  • 300 (3x zoom)
  • 350 (3,5x zoom)
  • ...
The first value is always 100 and the last value corresponds to the maximum zoom.
Example:
100<RC>200<RC>300<RC>350
Remark: The function will return an empty string ("") if the device camera does not support the zoom.
iPhone/iPadMac Catalyst This constant is not available.

Modifying the value of a parameter for the device camera Hide the details

<Result> = VideoParameter(<Parameter> , <Value>)
<Result>: Boolean
  • True if the modification of the parameter was successfully performed,
  • False otherwise or if an error occurred while retrieving the camera parameters. For example, VideoParameter will return False if the specified parameter (or its value) is not supported by the camera.
If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo.
<Parameter>: Character String constant or character string
Parameter for which the value will be modified. This parameter can correspond to:
  • one of the preset constants. These constants correspond to the most common parameters.
  • a String corresponding to the name of the desired parameter.
    Caution: the parameter name is case and accent-sensitive. See the documentation about the Android SDK or about the device to find out the name of additional supported parameters. If the specified name does not correspond to a parameter supported by the camera, the function will return an empty string.
The available constants are as follows:
vipBalanceBalance mode of whites for the camera.
iPhone/iPadMac Catalyst This constant is not available.
vipCameraSubscript of the camera to use.
Caution: the change of camera reinitializes the parameters previously defined by VideoParameter.
vipCompressionJPEGCompression of JPEG images.
iPhone/iPadMac Catalyst This constant is not available.
vipEffectEffect of colors.
iPhone/iPadMac Catalyst This constant is not available.
vipFlashFlash mode that will be used by the camera.
vipFlickerAdjustment of flicker (anti-banding) that will be used by the camera.
iPhone/iPadMac Catalyst This constant is not available.
vipFocusFocus mode that will be used by the camera.
iPhone/iPadMac Catalyst This constant is not available.
vipGeoPositionGeolocation information to be used.
iPhone/iPadMac Catalyst This constant is not available.
vipISOISO sensitivities supported by the camera.
iPhone/iPadMac Catalyst This constant is not available.
vipPhotoResolutionDefinition of resolution for the photos taken by the camera.
iPhone/iPadMac Catalyst This constant is not available.
vipRotationAutoAutomatic rotation of photos according to the device orientation during the capture.
iPhone/iPadMac Catalyst This constant is not available.
vipSceneTypes of scenes that will be used by the camera.
iPhone/iPadMac Catalyst This constant is not available.
vipZoomZoom value that will be used by the camera.
iPhone/iPadMac Catalyst This constant is not available.
<Value>: Type corresponding to the parameter to modify
New value for the parameter.
See the remarks to find out the table of correspondences between the parameter to modify and the expected value.
Remarks

Table of correspondences between the parameter to modify and the possible values for this parameter

Parameter to modifyExpected value
vipBalanceBalance modes for the whites supported by the camera.
This parameter can correspond to one of the following constants or to a Character String variable:
  • vipBalanceAuto: automatic mode
  • vipBalanceTwilight: twilight lighting
  • vipBalanceSunny: sunny lighting
  • vipBalanceFluorescent: fluorescent lighting
  • vipBalanceFluorescentWarm: warm fluorescent lighting
  • vipBalanceIncandescent: incandescent lighting
  • vipBalanceCloudy: cloudy lighting
  • vipBalanceShadow: shadow lighting
iPhone/iPadMac Catalyst This parameter is not available.
vipCameraIndex of the camera to use. This parameter can correspond to:
  • an integer included between 1 and the number of cameras found on the device
  • one of the following constants:
    • vipCameraBack: the first back camera (opposite to the screen) is used.
    • vipCameraFront: the first front camera (facing the screen) is used.
vipCompressionJPEGCompression of JPEG images.
Integer included between 1 and 100:
  • 1: Maximum compression (low quality)
  • 100: No compression (very high quality)
iPhone/iPadMac Catalyst This parameter is not available.
vipEffectColor effects.
This parameter can correspond to one of the following constants or to a Character String variable:
  • vipEffectAqua: Aqua effect
  • vipEffectNone: no effect
  • vipEffectNegative: negative effect
  • vipEffectBlackAndWhite: black and white effect
  • vipEffectPoster: Poster effect
  • vipEffectSolarize: solarize effect
  • vipEffectSepia: sepia effect
iPhone/iPadMac Catalyst This parameter is not available.
vipFlashFlash modes supported by the camera.
This parameter can correspond to one of the following constants or to a Character String variable:
  • vipFlashAuto: automatic mode (the flash is started when the lighting is not sufficient).
    iPhone/iPadMac Catalyst This constant is not available.
  • vipFlashOff: flash switched off.
  • vipFlashOn: flash switched on when taking the photo.
  • vipFlashTorch: torch mode: continuous flash lighting.
    iPhone/iPadMac Catalyst This constant is not available.
  • vipFlashRedEyes: anti red eyes mode.
    iPhone/iPadMac Catalyst This constant is not available.
vipFocusFocus modes supported by the camera.
This parameter can correspond to one of the following constants or to a Character String variable:
  • vipFocusAuto: autofocus
  • vipFocusContinuous: continuous (for video recording)
  • vipFocusFixed: fixed
  • vipFocusInfinite: infinite
  • vipFocusMacro: macro (very close subject)
  • vipFocusDepthOfField: depth of field
iPhone/iPadMac Catalyst This parameter is not available.
vipGeoPositionGeolocation information.
This parameter corresponds to a variable of type geoPosition.
iPhone/iPadMac Catalyst This parameter is not available.
vipISOISO sensitivities supported by the camera.
This parameter can correspond to one of the following constants or to a Character String variable:
  • vipISOAuto: Automatic adjustment of the sensitivity
  • "100", "200", "400", "800", ...
iPhone/iPadMac Catalyst This parameter is not available.
vipPhotoResolutionResolution of photos taken by the camera.
This parameter uses the following format:
<Largeur><TAB><Hauteur>
Example:
1024<TAB>680
iPhone/iPadMac Catalyst This parameter is not available.
vipRotationAutoAutomatic rotation of photos according to the device orientation during the capture.
Boolean parameter:
  • True: the automatic rotation is enabled.
  • False: the automatic rotation is disabled.
If the automatic rotation is enabled, the photo will be saved while taking into account the orientation of the device during the capture.
The automatic rotation is enabled by default ; however, some devices do not support taking photos in portrait mode. In this case, we advise you to disable the automatic rotation and to manage the image rotation through programming.
iPhone/iPadMac Catalyst This parameter is not available.
vipSceneTypes of scenes supported by the camera.
This parameter can correspond to one of the following constants or to a Character String variable:
  • vipSceneAction: the subject is moving
  • vipSceneAuto: automatic mode
  • vipSceneCandle: candlelight
  • vipSceneBarCode: get barcode
  • vipSceneSunset : sunset
  • vipSceneFireworks: Fireworks
  • vipSceneInterior: photo taken indoors
  • vipSceneSnow: snow
  • vipSceneNight: photo by night
  • vipSceneLandscape: subject far away, landscape
  • vipSceneBeach: beach
  • vipScenePortrait: portrait
  • vipSceneNightPortrait: portrait by night
  • vipSceneSport: subject moving fast, sports
  • vipSceneTheater: theater/museum (no flash)
  • vipSceneVibration: correction of vibrations
iPhone/iPadMac Catalyst This parameter is not available.
vipFlickerAdjustments of flicker (anti-banding) supported by the camera.
This parameter can correspond to one of the following constants or to a Character String variable:
  • vipFlickerAuto: automatic adjustment
  • vipFlickerOff : no adjustment of flicker
  • vipFlicker50Hz: 50 Hertz
  • vipFlicker60Hz : 60 Hertz
iPhone/iPadMac Catalyst This parameter is not available.
vipZoomZoom values supported by the camera.
Integer variable.
Example:
  • 100: 1x zoom = no zoom
  • 200: 2x zoom
  • 300: 3x zoom
  • 350: 3,5x zoom
  • ...
iPhone/iPadMac Catalyst This parameter is not available.

If the value of the parameter does not correspond to one of the above-mentioned WLanguage constants, you have the ability to specify this value directly. See the documentation about the Android SDK or about the device to find out the additional values and/or use VideoListParameter to find out whether this value is supported. If the specified value is not supported by the camera, VideoParameter will return False.
Android

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: CAMERA.
This permission allows the applications to access the camera.
Related Examples:
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:
- NFC
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- LED
- Vibration
- Notifications
- Drawing functions
- Internet
Component: wd290android.aar
Minimum version required
  • Version 17
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help