PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns or modifies the value of a parameter for the device camera.
Notes:
  • To find out the list of values supported by the camera for a given parameter, use CameraListParameter.
  • Android CameraParameter can be used in the Android emulator but not in the simulator.
  • This function is equivalent to VideoParameter.
Example
// Use the maximum resolution to take a photo
sListResolution is string
sListResolution = CameraListParameter(vipPhotoResolution)
IF ErrorOccurred = False THEN
CameraParameter(vipPhotoResolution, ExtractString(sListResolution, lastRank, CR))
ELSE
Error("Error while retrieving the resolutions supported by the camera.")
END

// Use the maximum zoom value
sListZoom is string
sListZoom = CameraListParameter(vipZoom)
IF ErrorOccurred = False THEN
nZoom is int = Val(ExtractString(sListZoom, lastRank, CR))
IF CameraParameter(vipZoom, nZoom) = False THEN
Error("The camera cannot zoom.")
END
END

// Geo-localization of the photos taken by the camera
MyPosition is geoPosition = GPSGetPosition()
CameraParameter(vipGeoPosition, MyPosition)

// Set the ISO sensitivity
CameraParameter(vipISO, 800)
Syntax

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

<Result> = CameraParameter(<Parameter>)
<Result>: Type of retrieved parameter
  • Value of parameter,
  • Empty string ("") if the specified parameter is not supported by the camera or if an error occurred while retrieving the camera parameters.
The ErrorOccurred variable is set to True if an error occurred. To find out the error details, 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 character string (between quotes) corresponding to the name of requested parameter.
    Caution: the parameter name is sensitive to the case and to the accented characters. 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/iPad This constant is not available.
vipCameraSubscript 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/iPad This constant is not available.
vipEffectEffect of colors currently taken into account: black and white, poster, sepia, ...
iPhone/iPad This constant is not available.
vipFlashCurrent status of camera flash: automatic, without, anti red eyes, ...
vipFocusCurrent status of camera focus: automatic, macro, fixed, ...
iPhone/iPad This constant is not available.
vipGeoPositionCurrent geo-localization 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/iPad This constant is not available.
vipISOISO sensibility currently used by the camera: automatic, 100, 200, 400, ...
iPhone/iPad 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/iPad 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 by programming.
iPhone/iPad This constant is not available.
vipSceneTypes of scenes currently used by the camera: automatic, night, sports, ...
iPhone/iPad This constant is not available.
vipFlickerAdjustment of flicker (anti-banding) currently used by the camera: automatic, none, 50Hz, 60Hz, ...
iPhone/iPad 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 camera does not support the zoom.
iPhone/iPad This constant is not available.

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

<Result> = CameraParameter(<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, CameraParameter will return False if the specified parameter (or its value) is not supported by the camera.
The ErrorOccurred variable is set to True if an error occurred. To find out the error details, 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 character string (between quotes) corresponding to the name of requested parameter.
    Caution: the parameter name is sensitive to the case and to the accented characters. 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: The available constants are as follows:
vipBalanceBalance mode of whites for the camera
iPhone/iPad This constant is not available.
vipCameraSubscript of the camera to use.
Caution: the change of camera reinitializes the parameters previously defined by CameraParameter.
vipCompressionJPEGCompression of JPEG images.
iPhone/iPad This constant is not available.
vipEffectEffect of colors.
iPhone/iPad This constant is not available.
vipFlashFlash mode that will be used by the camera.
vipFocusFocus mode that will be used by the camera.
iPhone/iPad This constant is not available.
vipGeoPositionGeo-localization information to use.
iPhone/iPad This constant is not available.
vipISOISO sensitivities supported by the camera.
iPhone/iPad This constant is not available.
vipPhotoResolutionDefinition of resolution for the photos taken by the camera.
iPhone/iPad This constant is not available.
vipRotationAutoAutomatic rotation of photos according to the device orientation during the capture.
iPhone/iPad This constant is not available.
vipSceneTypes of scenes that will be used by the camera.
iPhone/iPad This constant is not available.
vipFlickerAdjustment of flicker (anti-banding) that will be used by the camera.
iPhone/iPad This constant is not available.
vipZoomZoom value that will be used by the camera.
iPhone/iPad This constant is not available.
<Value>: Type corresponding to the parameter to modify
New value for the parameter.
See 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/iPad This parameter is not available.
vipCameraSubscript 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/iPad 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/iPad 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/iPad This constant is not available.
  • vipFlashOff: flash switched off.
  • vipFlashOn: flash switched on when taking the photo.
  • vipFlashTorch: torch mode: continuous flash lighting.
    iPhone/iPad This constant is not available.
  • vipFlashRedEyes: anti red eyes mode.
    iPhone/iPad 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: auto-focus
  • vipFocusContinuous: continuous (for video recording)
  • vipFocusFixed: fixed
  • vipFocusInfinite: infinite
  • vipFocusMacro: macro (very close subject)
  • vipFocusDepthOfField: depth of field
iPhone/iPad This parameter is not available.
vipGeoPositionInformation about the geo-localization.
This parameter corresponds to a geoPosition variable.
iPhone/iPad 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/iPad This parameter is not available.
vipPhotoResolutionResolution of photos taken by the camera.
This parameter is using the following format:
<Width><TAB><Height>
Example:
1024<TAB>680
iPhone/iPad 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 by programming.
iPhone/iPad 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: reading bar codes
  • 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/iPad 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/iPad 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/iPad This parameter is not available.
If the value of the parameter does not correspond to one of the above-mentioned WLangage 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 CameraListParameter to find out whether this value is supported. If the specified value is not supported by the camera, CameraParameter will return False.

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.
Components
Android wd230android.jar
Minimum required version
  • Version 22
Comments
Click [Add] to post a comment