# CameraExtensionsControl

Artifact: [androidx.camera:camera-extensions](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/extensions/CameraExtensionsControl.java+class:androidx.camera.extensions.CameraExtensionsControl) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/camera#1.4.0)

*** ** * ** ***


```
interface CameraExtensionsControl
```

<br />

*** ** * ** ***

A camera extensions control instance that allows customization of capture request settings for supported camera extensions.

Applications can leverage the `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionsManager#getCameraExtensionsControl(androidx.camera.core.CameraControl)` method to acquire a CameraExtensionsControl object to manage extension-related settings.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsControl#setExtensionStrength(int)(strength: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0, to = 100) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the extension strength for the extension mode associated with the CameraExtensionsControl. |

## Public functions

### setExtensionStrength

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/camera#1.4.0)

```
fun setExtensionStrength(strength: @IntRange(from = 0, to = 100) Int): Unit
```

Sets the extension strength for the extension mode associated with the CameraExtensionsControl.

Strength equal to 0 means that the extension must not apply any post-processing and return a regular captured frame. Strength equal to 100 is the default level of post-processing applied when the control is not supported or not set by the client. Values between 0 and 100 will have different effect depending on the extension type as described below:

- `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionMode#BOKEH()` - the strength will control the amount of blur.
- `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionMode#HDR()` and `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionMode#NIGHT()` - the strength will control the amount of images fused and the brightness of the final image.
- `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionMode#FACE_RETOUCH()` - the strength value will control the amount of cosmetic enhancement and skin smoothing.

This will be supported if the `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#isExtensionStrengthAvailable()` associated to the same extensions enabled camera returns `true`. Invoking this method will be no-op if extension strength is not supported.

| Parameters |
|---|---|
| `strength: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0, to = 100) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the new extension strength value |