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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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 geoPosition = GPSGetPosition()
VideoParameter(vipGeoPosition, 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: parameter name is case sensitive and accentuated. 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:
vipBalanceWhite balance mode currently supported by the camera: automation, 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.
vipEffectColor effects currently supported: black and white, poster, sepia, ...
iPhone/iPadMac Catalyst This constant is not available.
vipFlashCurrent status of camera flash: automation, without, red-eye reduction, etc.
vipFlickerFlicker adjustment (antibanding) currently used by the camera: automatic, none, 50Hz, 60Hz, ...
iPhone/iPadMac Catalyst This constant is not available.
vipFocusCurrent camera focus status: automation, macro, fixed, ...
iPhone/iPadMac Catalyst This constant is not available.
vipGeoPositionCurrent geolocation information: the value returned is a variable of type geoPosition. The following properties can be entered, depending on what the camera manages: latitude, longitude, z-order, measurement date, etc.
iPhone/iPadMac Catalyst This constant is not available.
vipISOISO sensitivity currently used by the camera: automation, 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:
<Width><TAB><Height>
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: automatic rotation is activated.
  • False 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 programmatically.
iPhone/iPadMac Catalyst This constant is not available.
vipSceneScene type currently used by the camera: automation, night, sport, ...
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<CR>200<CR>300<CR>350
Note The function will return an empty string ("") if the device's camera does not support 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: parameter name is case sensitive and accentuated. 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.
vipCameraIndex of the camera to use.
Warning: changing the camera will reset the parameters previously set with the VideoParameterfunction.
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
  • vipBalanceDusk: twilight lighting
  • vipBalanceSunny: sunny lighting
  • vipBalanceFluorescent: fluorescent lighting
  • vipBalanceFluorescentChaud Warm fluorescent lighting
  • vipBalanceIncandescent: incandescent lighting
  • vipBalanceCloudy cloudy lighting
  • vipBalanceOmbrageux shadowy 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:
    • vipDorsalCamera: using the first dorsal camera (located on the opposite side of the screen).
    • vipFrontCam: use of the first front camera (located on the same side as the screen).
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:
  • vipEffetAqua: Aqua effect
  • vipEffectNone: no effect
  • vipNegative effect: negative effect
  • vipEffetNoirEtBlanc: black and white effect
  • vipEffetPoster: Poster effect
  • vipEffetSolarise: solarise effect
  • vipSepia effect: 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 (flash lights up in low-light conditions).
    iPhone/iPadMac Catalyst This constant is not available.
  • vipFlashOff flash off.
  • vipFlashOn flash on at the moment of shooting.
  • vipFlashTorch torch mode: continuous flash illumination.
    iPhone/iPadMac Catalyst This constant is not available.
  • vipFlashRedEye Red-eye reduction 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)
  • vipFocusFixe fixed
  • vipFocusInfinity: infinity
  • vipFocusMacro: macro (close-up subject)
  • vipFocusProfondeurChamp 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 sensitivity adjustment
  • "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:
<Width><TAB><Height>
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: automatic rotation is activated.
  • False 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 programmatically.
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:
  • vipScèneAction: subject in motion
  • vipScèneAuto: automatic mode
  • vipScèneBougie: candle lighting
  • vipScèneCodeBarres barcode reading
  • vipSceneSunset: sunset
  • vipSceneFireworks: Fireworks
  • vipSceneIndoor: indoor photo
  • vipScèneNeige: snow
  • vipScèneNuit: night photo
  • vipSceneLandscape distant subject, landscape
  • vipScènePlage: beach
  • vipScenePortrait portrait
  • vipScenePortraitNight night portrait
  • vipSceneSport fast-moving subjects, athletes
  • vipScèneTheatre theater/museum (no flash)
  • vipScèneVibration: vibration correction
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:
  • vipScintillementAuto: automatic adjustment
  • vipScintillementOff: no flicker adjustment
  • vipScintillement50Hz: 50 Hertz
  • vipScintillement60Hz: 60 Hertz
iPhone/iPadMac Catalyst This parameter is not available.
vipZoomZoom values supported by the camera.
Integer variable.
Example:
  • 100: zoom 1x = 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

This function changes the permissions required by the application.
Permission required: 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: wd300android.aar
Minimum version required
  • Version 17
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help