# ColorSpaceProfiles

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#constants)\|[Ctors](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#pubctors)\|[Methods](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#inhmethods)  

# ColorSpaceProfiles

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/hardware/camera2/params/ColorSpaceProfiles "View this page in Kotlin")\|Java

`
public

final

class
ColorSpaceProfiles
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|----------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.hardware.camera2.params.ColorSpaceProfiles |

<br />

*** ** * ** ***

Immutable class with information about supported color space profiles.

An instance of this class can be queried by retrieving the value of[CameraCharacteristics.REQUEST_AVAILABLE_COLOR_SPACE_PROFILES](https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#REQUEST_AVAILABLE_COLOR_SPACE_PROFILES).

All camera devices supporting the[CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES)capability must advertise the supported color space profiles in[getSupportedColorSpaces(int)](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#getSupportedColorSpaces(int))

<br />

**See also:**

- [SessionConfiguration.setColorSpace(Named)](https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration#setColorSpace(android.graphics.ColorSpace.Named))

## Summary

|                                                            ### Constants                                                            ||
|-------|------------------------------------------------------------------------------------------------------------------------------|
| `int` | [UNSPECIFIED](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#UNSPECIFIED) <br /> |

|                                                                                                  ### Public constructors                                                                                                  ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ColorSpaceProfiles](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#ColorSpaceProfiles(long[]))`(long[] elements) ` Create a new immutable ColorSpaceProfiles instance. |

|                                                                                                                                                                                                                                                                                                ### Public methods                                                                                                                                                                                                                                                                                                ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Set](https://developer.android.com/reference/java/util/Set)`<`[ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)`>` | ` `[getSupportedColorSpaces](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#getSupportedColorSpaces(int))`(int imageFormat) ` Return a list of color spaces that are compatible with an ImageFormat.                                                                                                                                                                                             |
| ` `[Set](https://developer.android.com/reference/java/util/Set)`<`[ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)`>` | ` `[getSupportedColorSpacesForDynamicRange](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#getSupportedColorSpacesForDynamicRange(int,%20long))`(int imageFormat, long dynamicRangeProfile) ` Return a list of color spaces that are compatible with an ImageFormat and a dynamic range profile.                                                                                                 |
| ` `[Set](https://developer.android.com/reference/java/util/Set)`<`[Long](https://developer.android.com/reference/java/lang/Long)`>`                                | ` `[getSupportedDynamicRangeProfiles](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#getSupportedDynamicRangeProfiles(android.graphics.ColorSpace.Named,%20int))`(`[ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)` colorSpace, int imageFormat) ` Return a list of dynamic range profiles that are compatible with a color space and ImageFormat. |
| ` `[Set](https://developer.android.com/reference/java/util/Set)`<`[Integer](https://developer.android.com/reference/java/lang/Integer)`>`                          | ` `[getSupportedImageFormatsForColorSpace](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles#getSupportedImageFormatsForColorSpace(android.graphics.ColorSpace.Named))`(`[ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)` colorSpace) ` Return a list of image formats that are compatible with a color space.                                        |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### UNSPECIFIED

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int UNSPECIFIED
```

<br />

<br />

Constant Value: -1 (0xffffffff)

## Public constructors

### ColorSpaceProfiles

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ColorSpaceProfiles (long[] elements)
```

Create a new immutable ColorSpaceProfiles instance.

This constructor takes over the array; do not write to the array afterwards.

Do note that the constructor is available for testing purposes only! Camera clients must always retrieve the value of[CameraCharacteristics.REQUEST_AVAILABLE_COLOR_SPACE_PROFILES](https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#REQUEST_AVAILABLE_COLOR_SPACE_PROFILES). for a given camera id in order to retrieve the device capabilities.

<br />

<br />

|                                                                                                                                                                                                                                                          Parameters                                                                                                                                                                                                                                                           ||
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `elements` | `long`: An array of elements describing the map. It contains three elements per entry which describe the supported color space profile value in the first element, a compatible image format in the second, and in the third element a bitmap of compatible dynamic range profiles (see[DynamicRangeProfiles.STANDARD](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#STANDARD)and others for the individual bitmap components). This value cannot be`null`. <br /> |

|                                                                                                 Throws                                                                                                 ||
|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if the`elements`array length is invalid, not divisible by 3 or contains invalid element values |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | if`elements`is`null`                                                                           |

## Public methods

### getSupportedColorSpaces

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Set<ColorSpace.Named> getSupportedColorSpaces (int imageFormat)
```

Return a list of color spaces that are compatible with an ImageFormat. If ImageFormat.UNKNOWN is provided, this function will return a set of all unique color spaces supported by the device, regardless of image format. Color spaces which are compatible with ImageFormat.PRIVATE are able to be used with SurfaceView, SurfaceTexture, MediaCodec and MediaRecorder.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ||
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `imageFormat` | `int`: Value is[ImageFormat.UNKNOWN](https://developer.android.com/reference/android/graphics/ImageFormat#UNKNOWN),[PixelFormat.RGBA_8888](https://developer.android.com/reference/android/graphics/PixelFormat#RGBA_8888),[PixelFormat.RGBX_8888](https://developer.android.com/reference/android/graphics/PixelFormat#RGBX_8888),[PixelFormat.RGB_888](https://developer.android.com/reference/android/graphics/PixelFormat#RGB_888),[ImageFormat.RGB_565](https://developer.android.com/reference/android/graphics/ImageFormat#RGB_565),[ImageFormat.YV12](https://developer.android.com/reference/android/graphics/ImageFormat#YV12),[ImageFormat.Y8](https://developer.android.com/reference/android/graphics/ImageFormat#Y8), android.graphics.ImageFormat.Y16,[ImageFormat.YCBCR_P010](https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P010),[ImageFormat.YCBCR_P210](https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P210),[ImageFormat.NV16](https://developer.android.com/reference/android/graphics/ImageFormat#NV16),[ImageFormat.NV21](https://developer.android.com/reference/android/graphics/ImageFormat#NV21),[ImageFormat.YUY2](https://developer.android.com/reference/android/graphics/ImageFormat#YUY2),[ImageFormat.JPEG](https://developer.android.com/reference/android/graphics/ImageFormat#JPEG),[ImageFormat.DEPTH_JPEG](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH_JPEG),[ImageFormat.YUV_420_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_420_888),[ImageFormat.YUV_422_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_422_888),[ImageFormat.YUV_444_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_444_888),[ImageFormat.FLEX_RGB_888](https://developer.android.com/reference/android/graphics/ImageFormat#FLEX_RGB_888),[ImageFormat.FLEX_RGBA_8888](https://developer.android.com/reference/android/graphics/ImageFormat#FLEX_RGBA_8888),[ImageFormat.RAW_SENSOR](https://developer.android.com/reference/android/graphics/ImageFormat#RAW_SENSOR),[ImageFormat.RAW_PRIVATE](https://developer.android.com/reference/android/graphics/ImageFormat#RAW_PRIVATE),[ImageFormat.RAW10](https://developer.android.com/reference/android/graphics/ImageFormat#RAW10),[ImageFormat.RAW12](https://developer.android.com/reference/android/graphics/ImageFormat#RAW12),[ImageFormat.DEPTH16](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH16),[ImageFormat.DEPTH_POINT_CLOUD](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH_POINT_CLOUD), android.graphics.ImageFormat.RAW_DEPTH, android.graphics.ImageFormat.RAW_DEPTH10,[ImageFormat.PRIVATE](https://developer.android.com/reference/android/graphics/ImageFormat#PRIVATE),[ImageFormat.HEIC](https://developer.android.com/reference/android/graphics/ImageFormat#HEIC),[ImageFormat.HEIC_ULTRAHDR](https://developer.android.com/reference/android/graphics/ImageFormat#HEIC_ULTRAHDR), or[ImageFormat.JPEG_R](https://developer.android.com/reference/android/graphics/ImageFormat#JPEG_R) <br /> |

|                                                                                                         Returns                                                                                                         ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| [Set](https://developer.android.com/reference/java/util/Set)`<`[ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)`>` | set of color spaces This value cannot be`null`. <br /> |

**See also:**

- [SessionConfiguration.setColorSpace(Named)](https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration#setColorSpace(android.graphics.ColorSpace.Named))
- [ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)  

### getSupportedColorSpacesForDynamicRange

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Set<ColorSpace.Named> getSupportedColorSpacesForDynamicRange (int imageFormat, 
                long dynamicRangeProfile)
```

Return a list of color spaces that are compatible with an ImageFormat and a dynamic range profile. If ImageFormat.UNKNOWN is provided, this function will return a set of all unique color spaces compatible with the given dynamic range profile, regardless of image format.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `imageFormat`         | `int`: Value is[ImageFormat.UNKNOWN](https://developer.android.com/reference/android/graphics/ImageFormat#UNKNOWN),[PixelFormat.RGBA_8888](https://developer.android.com/reference/android/graphics/PixelFormat#RGBA_8888),[PixelFormat.RGBX_8888](https://developer.android.com/reference/android/graphics/PixelFormat#RGBX_8888),[PixelFormat.RGB_888](https://developer.android.com/reference/android/graphics/PixelFormat#RGB_888),[ImageFormat.RGB_565](https://developer.android.com/reference/android/graphics/ImageFormat#RGB_565),[ImageFormat.YV12](https://developer.android.com/reference/android/graphics/ImageFormat#YV12),[ImageFormat.Y8](https://developer.android.com/reference/android/graphics/ImageFormat#Y8), android.graphics.ImageFormat.Y16,[ImageFormat.YCBCR_P010](https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P010),[ImageFormat.YCBCR_P210](https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P210),[ImageFormat.NV16](https://developer.android.com/reference/android/graphics/ImageFormat#NV16),[ImageFormat.NV21](https://developer.android.com/reference/android/graphics/ImageFormat#NV21),[ImageFormat.YUY2](https://developer.android.com/reference/android/graphics/ImageFormat#YUY2),[ImageFormat.JPEG](https://developer.android.com/reference/android/graphics/ImageFormat#JPEG),[ImageFormat.DEPTH_JPEG](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH_JPEG),[ImageFormat.YUV_420_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_420_888),[ImageFormat.YUV_422_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_422_888),[ImageFormat.YUV_444_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_444_888),[ImageFormat.FLEX_RGB_888](https://developer.android.com/reference/android/graphics/ImageFormat#FLEX_RGB_888),[ImageFormat.FLEX_RGBA_8888](https://developer.android.com/reference/android/graphics/ImageFormat#FLEX_RGBA_8888),[ImageFormat.RAW_SENSOR](https://developer.android.com/reference/android/graphics/ImageFormat#RAW_SENSOR),[ImageFormat.RAW_PRIVATE](https://developer.android.com/reference/android/graphics/ImageFormat#RAW_PRIVATE),[ImageFormat.RAW10](https://developer.android.com/reference/android/graphics/ImageFormat#RAW10),[ImageFormat.RAW12](https://developer.android.com/reference/android/graphics/ImageFormat#RAW12),[ImageFormat.DEPTH16](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH16),[ImageFormat.DEPTH_POINT_CLOUD](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH_POINT_CLOUD), android.graphics.ImageFormat.RAW_DEPTH, android.graphics.ImageFormat.RAW_DEPTH10,[ImageFormat.PRIVATE](https://developer.android.com/reference/android/graphics/ImageFormat#PRIVATE),[ImageFormat.HEIC](https://developer.android.com/reference/android/graphics/ImageFormat#HEIC),[ImageFormat.HEIC_ULTRAHDR](https://developer.android.com/reference/android/graphics/ImageFormat#HEIC_ULTRAHDR), or[ImageFormat.JPEG_R](https://developer.android.com/reference/android/graphics/ImageFormat#JPEG_R) <br /> |
| `dynamicRangeProfile` | `long`: Value is[DynamicRangeProfiles.STANDARD](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#STANDARD),[DynamicRangeProfiles.HLG10](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#HLG10),[DynamicRangeProfiles.HDR10](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#HDR10),[DynamicRangeProfiles.HDR10_PLUS](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#HDR10_PLUS),[DynamicRangeProfiles.DOLBY_VISION_10B_HDR_REF](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#DOLBY_VISION_10B_HDR_REF),[DynamicRangeProfiles.DOLBY_VISION_10B_HDR_REF_PO](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#DOLBY_VISION_10B_HDR_REF_PO),[DynamicRangeProfiles.DOLBY_VISION_10B_HDR_OEM](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#DOLBY_VISION_10B_HDR_OEM),[DynamicRangeProfiles.DOLBY_VISION_10B_HDR_OEM_PO](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#DOLBY_VISION_10B_HDR_OEM_PO),[DynamicRangeProfiles.DOLBY_VISION_8B_HDR_REF](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#DOLBY_VISION_8B_HDR_REF),[DynamicRangeProfiles.DOLBY_VISION_8B_HDR_REF_PO](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#DOLBY_VISION_8B_HDR_REF_PO),[DynamicRangeProfiles.DOLBY_VISION_8B_HDR_OEM](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#DOLBY_VISION_8B_HDR_OEM), or[DynamicRangeProfiles.DOLBY_VISION_8B_HDR_OEM_PO](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#DOLBY_VISION_8B_HDR_OEM_PO) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

|                                                                                                         Returns                                                                                                         ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| [Set](https://developer.android.com/reference/java/util/Set)`<`[ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)`>` | set of color spaces This value cannot be`null`. <br /> |

**See also:**

- [SessionConfiguration.setColorSpace(Named)](https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration#setColorSpace(android.graphics.ColorSpace.Named))
- [OutputConfiguration.setDynamicRangeProfile(long)](https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration#setDynamicRangeProfile(long))
- [ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)
- [DynamicRangeProfiles](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles)  

### getSupportedDynamicRangeProfiles

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Set<Long> getSupportedDynamicRangeProfiles (ColorSpace.Named colorSpace, 
                int imageFormat)
```

Return a list of dynamic range profiles that are compatible with a color space and ImageFormat. If ImageFormat.UNKNOWN is provided, this function will return a set of all unique dynamic range profiles supported by the device given a color space, regardless of image format.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ||
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `colorSpace`  | `ColorSpace.Named`: This value cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `imageFormat` | `int`: Value is[ImageFormat.UNKNOWN](https://developer.android.com/reference/android/graphics/ImageFormat#UNKNOWN),[PixelFormat.RGBA_8888](https://developer.android.com/reference/android/graphics/PixelFormat#RGBA_8888),[PixelFormat.RGBX_8888](https://developer.android.com/reference/android/graphics/PixelFormat#RGBX_8888),[PixelFormat.RGB_888](https://developer.android.com/reference/android/graphics/PixelFormat#RGB_888),[ImageFormat.RGB_565](https://developer.android.com/reference/android/graphics/ImageFormat#RGB_565),[ImageFormat.YV12](https://developer.android.com/reference/android/graphics/ImageFormat#YV12),[ImageFormat.Y8](https://developer.android.com/reference/android/graphics/ImageFormat#Y8), android.graphics.ImageFormat.Y16,[ImageFormat.YCBCR_P010](https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P010),[ImageFormat.YCBCR_P210](https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P210),[ImageFormat.NV16](https://developer.android.com/reference/android/graphics/ImageFormat#NV16),[ImageFormat.NV21](https://developer.android.com/reference/android/graphics/ImageFormat#NV21),[ImageFormat.YUY2](https://developer.android.com/reference/android/graphics/ImageFormat#YUY2),[ImageFormat.JPEG](https://developer.android.com/reference/android/graphics/ImageFormat#JPEG),[ImageFormat.DEPTH_JPEG](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH_JPEG),[ImageFormat.YUV_420_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_420_888),[ImageFormat.YUV_422_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_422_888),[ImageFormat.YUV_444_888](https://developer.android.com/reference/android/graphics/ImageFormat#YUV_444_888),[ImageFormat.FLEX_RGB_888](https://developer.android.com/reference/android/graphics/ImageFormat#FLEX_RGB_888),[ImageFormat.FLEX_RGBA_8888](https://developer.android.com/reference/android/graphics/ImageFormat#FLEX_RGBA_8888),[ImageFormat.RAW_SENSOR](https://developer.android.com/reference/android/graphics/ImageFormat#RAW_SENSOR),[ImageFormat.RAW_PRIVATE](https://developer.android.com/reference/android/graphics/ImageFormat#RAW_PRIVATE),[ImageFormat.RAW10](https://developer.android.com/reference/android/graphics/ImageFormat#RAW10),[ImageFormat.RAW12](https://developer.android.com/reference/android/graphics/ImageFormat#RAW12),[ImageFormat.DEPTH16](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH16),[ImageFormat.DEPTH_POINT_CLOUD](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH_POINT_CLOUD), android.graphics.ImageFormat.RAW_DEPTH, android.graphics.ImageFormat.RAW_DEPTH10,[ImageFormat.PRIVATE](https://developer.android.com/reference/android/graphics/ImageFormat#PRIVATE),[ImageFormat.HEIC](https://developer.android.com/reference/android/graphics/ImageFormat#HEIC),[ImageFormat.HEIC_ULTRAHDR](https://developer.android.com/reference/android/graphics/ImageFormat#HEIC_ULTRAHDR), or[ImageFormat.JPEG_R](https://developer.android.com/reference/android/graphics/ImageFormat#JPEG_R) <br /> |

|                                                                                               Returns                                                                                               ||
|----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| [Set](https://developer.android.com/reference/java/util/Set)`<`[Long](https://developer.android.com/reference/java/lang/Long)`>` | set of dynamic range profiles. This value cannot be`null`. <br /> |

**See also:**

- [OutputConfiguration.setDynamicRangeProfile(long)](https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration#setDynamicRangeProfile(long))
- [SessionConfiguration.setColorSpace(Named)](https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration#setColorSpace(android.graphics.ColorSpace.Named))
- [ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)
- [DynamicRangeProfiles](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles)  

### getSupportedImageFormatsForColorSpace

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Set<Integer> getSupportedImageFormatsForColorSpace (ColorSpace.Named colorSpace)
```

Return a list of image formats that are compatible with a color space. Color spaces which are compatible with ImageFormat.PRIVATE are able to be used with SurfaceView, SurfaceTexture, MediaCodec and MediaRecorder.

<br />

|                              Parameters                              ||
|--------------|--------------------------------------------------------|
| `colorSpace` | `ColorSpace.Named`: This value cannot be`null`. <br /> |

|                                                                                             Returns                                                                                             ||
|----------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
| [Set](https://developer.android.com/reference/java/util/Set)`<`[Integer](https://developer.android.com/reference/java/lang/Integer)`>` | set of image formats This value cannot be`null`. <br /> |

**See also:**

- [SessionConfiguration.setColorSpace(Named)](https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration#setColorSpace(android.graphics.ColorSpace.Named))
- [ColorSpace.Named](https://developer.android.com/reference/android/graphics/ColorSpace.Named)