|
|
|
|
|
- Table of correspondences between the parameter to modify and the possible values for this parameter
- Required permissions
VideoParameter (Function) In french: VidéoParamètre Returns or modifies the value of a parameter for the device camera.
Warning
Remarks: - To find out the list of values supported by the camera for a given parameter, use VideoListParameter.
VideoParameter can be used in the Android emulator but not in the simulator.
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
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
MaPosition is geoPosition = GPSGetPosition()
VideoParameter(vipGeoPosition, MaPosition)
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: | | vipBalance | White balance mode currently supported by the camera: automation, daylight, cloudy, ...
| vipCamera | Index of camera currently used:- Subscript included between 1 and the number of cameras found on the device.
- -1 if no camera is currently used.
| vipCompressionJPEG | Compression of JPEG images, corresponding to an integer included between 1 and 100.- 1: Maximum compression (low quality)
- 100: No compression (very high quality)
| vipEffect | Color effects currently supported: black and white, poster, sepia, ...
| vipFlash | Current status of camera flash: automation, without, red-eye reduction, etc. | vipFlicker | Flicker adjustment (antibanding) currently used by the camera: automatic, none, 50Hz, 60Hz, ...
| vipFocus | Current camera focus status: automation, macro, fixed, ...
| vipGeoPosition | Current 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.
| vipISO | ISO sensitivity currently used by the camera: automation, 100, 200, 400, ...
| vipPhotoResolution | Resolution of photos taken by the camera. The value is returned in the following format:
| vipRotationAuto | Automatic 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.
| vipScene | Scene type currently used by the camera: automation, night, sport, ...
| vipZoom | Zoom 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:
Note The function will return an empty string ("") if the device's camera does not support zoom.
|
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: | | vipBalance | Balance mode of whites for the camera.
| vipCamera | Index of the camera to use. Warning: changing the camera will reset the parameters previously set with the VideoParameterfunction. | vipCompressionJPEG | Compression of JPEG images.
| vipEffect | Effect of colors.
| vipFlash | Flash mode that will be used by the camera. | vipFlicker | Adjustment of flicker (anti-banding) that will be used by the camera.
| vipFocus | Focus mode that will be used by the camera.
| vipGeoPosition | Geolocation information to be used.
| vipISO | ISO sensitivities supported by the camera.
| vipPhotoResolution | Definition of resolution for the photos taken by the camera.
| vipRotationAuto | Automatic rotation of photos according to the device orientation during the capture.
| vipScene | Types of scenes that will be used by the camera.
| vipZoom | Zoom value that will be used by the camera.
|
<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 modify | Expected value |
---|
vipBalance | Balance 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
| vipCamera | Index 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).
| vipCompressionJPEG | Compression of JPEG images. Integer included between 1 and 100: - 1: Maximum compression (low quality)
- 100: No compression (very high quality)
| vipEffect | Color 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
| vipFlash | Flash 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).
 This constant is not available. - vipFlashOff flash off.
- vipFlashOn flash on at the moment of shooting.
- vipFlashTorch torch mode: continuous flash illumination.
 This constant is not available. - vipFlashRedEye Red-eye reduction mode.
 This constant is not available.
| vipFocus | Focus 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
| vipGeoPosition | Geolocation information.This parameter corresponds to a variable of type geoPosition.
| vipISO | ISO 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", ...
| vipPhotoResolution | Resolution of photos taken by the camera.This parameter uses the following format: | vipRotationAuto | Automatic 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.
| vipScene | Types 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
| vipFlicker | Adjustments 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
| vipZoom | Zoom values supported by the camera. Integer variable. Example: - 100: zoom 1x = no zoom
- 200: 2x zoom
- 300: 3x zoom
- 350: 3.5x zoom
- ...
|
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.
Related Examples:
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|