# ColorSpaceProfilesWrapper

Artifact: [androidx.camera:camera-common](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/common/ColorSpaceProfilesWrapper.kt+class:androidx.camera.common.ColorSpaceProfilesWrapper) Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

*** ** * ** ***


```
interface ColorSpaceProfilesWrapper : UnsafeWrapper
```

<br />

Known direct subclasses [FakeColorSpaceProfiles](https://developer.android.com/reference/kotlin/androidx/camera/common/testing/FakeColorSpaceProfiles)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/common/testing/FakeColorSpaceProfiles` | A fake implementation of `https://developer.android.com/reference/kotlin/androidx/camera/common/ColorSpaceProfilesWrapper` for testing. |

*** ** * ** ***

A compatibility wrapper for color space profiles.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles.html` |   |

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/kotlin/androidx/camera/common/ColorSpaceProfilesWrapper#getSupportedColorSpaces(kotlin.Int)(imageFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Get the supported color spaces for a given image format. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/kotlin/androidx/camera/common/ColorSpaceProfilesWrapper#getSupportedColorSpacesForDynamicRange(kotlin.Int,kotlin.Long)( imageFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, dynamicRangeProfile: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Get the supported color spaces for a given image format and dynamic range profile. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>` | `https://developer.android.com/reference/kotlin/androidx/camera/common/ColorSpaceProfilesWrapper#getSupportedDynamicRangeProfiles(kotlin.String,kotlin.Int)( cameraColorSpace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, imageFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Get the supported dynamic range profiles for a given color space and image format. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>` | `https://developer.android.com/reference/kotlin/androidx/camera/common/ColorSpaceProfilesWrapper#getSupportedImageFormatsForColorSpace(kotlin.String)(cameraColorSpace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Get the supported image formats for a given color space. |

### Inherited functions

From [androidx.camera.common.UnsafeWrapper](https://developer.android.com/reference/kotlin/androidx/camera/common/UnsafeWrapper) `T?` `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)(type: https://developer.android.com/reference/java/lang/Class.html<T>)`

Attempts to unwrap this object into the specified underlying `https://developer.android.com/reference/kotlin/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)`.

## Public functions

### getSupportedColorSpaces

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

```
fun getSupportedColorSpaces(imageFormat: Int): Set<String>
```

Get the supported color spaces for a given image format.

| Parameters |
|---|---|
| `imageFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The image format to query. Value is one of the following: - `0` - `4` - `842094169` - `538982489` - `16` - `17` - `20` - `256` - `1768253795` - `35` - `39` - `40` - `41` - `42` - `32` - `36` - `37` - `38` - `1144402265` - `257` - `34` - `1212500294` - `54` - `4101` - `4098` - `4099` - `540422489` - `60` - `4102` - `56` - `55` - `57` - `58` - `59` - `-3` - `-2` - `-1` - `1` - `2` - `3` - `22` - `43` - `33` - `48` - `49` - `50` - `51` - `52` - `53` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | The set of supported `https://developer.android.com/reference/kotlin/androidx/camera/common/CameraColorSpace`s. |

### getSupportedColorSpacesForDynamicRange

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

```
fun getSupportedColorSpacesForDynamicRange(
    imageFormat: Int,
    dynamicRangeProfile: Long
): Set<String>
```

Get the supported color spaces for a given image format and dynamic range profile.

| Parameters |
|---|---|
| `imageFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The image format to query. Value is one of the following: - `0` - `4` - `842094169` - `538982489` - `16` - `17` - `20` - `256` - `1768253795` - `35` - `39` - `40` - `41` - `42` - `32` - `36` - `37` - `38` - `1144402265` - `257` - `34` - `1212500294` - `54` - `4101` - `4098` - `4099` - `540422489` - `60` - `4102` - `56` - `55` - `57` - `58` - `59` - `-3` - `-2` - `-1` - `1` - `2` - `3` - `22` - `43` - `33` - `48` - `49` - `50` - `51` - `52` - `53` <br /> |
| `dynamicRangeProfile: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The dynamic range profile to query. Value is one of the following: - `1` - `2` - `4` - `8` - `16` - `32` - `64` - `128` - `256` - `512` - `1024` - `2048` - `4096` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | The set of supported `https://developer.android.com/reference/kotlin/androidx/camera/common/CameraColorSpace`s. |

### getSupportedDynamicRangeProfiles

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

```
fun getSupportedDynamicRangeProfiles(
    cameraColorSpace: String,
    imageFormat: Int
): Set<Long>
```

Get the supported dynamic range profiles for a given color space and image format.

| Parameters |
|---|---|
| `cameraColorSpace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The `https://developer.android.com/reference/kotlin/androidx/camera/common/CameraColorSpace` to query. Value is one of the following: - `UNKNOWN` - `SRGB` - `LINEAR_SRGB` - `EXTENDED_SRGB` - `LINEAR_EXTENDED_SRGB` - `BT709` - `BT2020` - `DCI_P3` - `DISPLAY_P3` - `NTSC_1953` - `SMPTE_C` - `ADOBE_RGB` - `PRO_PHOTO_RGB` - `ACES` - `ACESCG` - `CIE_XYZ` - `CIE_LAB` - `BT2020_HLG` - `BT2020_PQ` <br /> |
| `imageFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The image format to query. Value is one of the following: - `0` - `4` - `842094169` - `538982489` - `16` - `17` - `20` - `256` - `1768253795` - `35` - `39` - `40` - `41` - `42` - `32` - `36` - `37` - `38` - `1144402265` - `257` - `34` - `1212500294` - `54` - `4101` - `4098` - `4099` - `540422489` - `60` - `4102` - `56` - `55` - `57` - `58` - `59` - `-3` - `-2` - `-1` - `1` - `2` - `3` - `22` - `43` - `33` - `48` - `49` - `50` - `51` - `52` - `53` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>` | A set of framework dynamic range profiles (e.g., `https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles.html#HDR10`) |

### getSupportedImageFormatsForColorSpace

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

```
fun getSupportedImageFormatsForColorSpace(cameraColorSpace: String): Set<Int>
```

Get the supported image formats for a given color space.

| Parameters |
|---|---|
| `cameraColorSpace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The `https://developer.android.com/reference/kotlin/androidx/camera/common/CameraColorSpace` to query. Value is one of the following: - `UNKNOWN` - `SRGB` - `LINEAR_SRGB` - `EXTENDED_SRGB` - `LINEAR_EXTENDED_SRGB` - `BT709` - `BT2020` - `DCI_P3` - `DISPLAY_P3` - `NTSC_1953` - `SMPTE_C` - `ADOBE_RGB` - `PRO_PHOTO_RGB` - `ACES` - `ACESCG` - `CIE_XYZ` - `CIE_LAB` - `BT2020_HLG` - `BT2020_PQ` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>` | The set of supported image formats. |