ColorSpaceProfiles
class ColorSpaceProfiles
kotlin.Any | |
↳ | android.hardware.camera2.params.ColorSpaceProfiles |
Immutable class with information about supported color space profiles.
An instance of this class can be queried by retrieving the value of android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_COLOR_SPACE_PROFILES
.
All camera devices supporting the android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES
capability must advertise the supported color space profiles in getSupportedColorSpaces
Summary
Constants | |
---|---|
static Int |
Public constructors | |
---|---|
ColorSpaceProfiles(elements: LongArray) Create a new immutable ColorSpaceProfiles instance. |
Public methods | |
---|---|
MutableSet<ColorSpace.Named!> |
getSupportedColorSpaces(imageFormat: Int) Return a list of color spaces that are compatible with an ImageFormat. |
MutableSet<ColorSpace.Named!> |
getSupportedColorSpacesForDynamicRange(imageFormat: Int, dynamicRangeProfile: Long) Return a list of color spaces that are compatible with an ImageFormat and a dynamic range profile. |
MutableSet<Long!> |
getSupportedDynamicRangeProfiles(colorSpace: ColorSpace.Named, imageFormat: Int) Return a list of dynamic range profiles that are compatible with a color space and ImageFormat. |
MutableSet<Int!> |
getSupportedImageFormatsForColorSpace(colorSpace: ColorSpace.Named) Return a list of image formats that are compatible with a color space. |
Constants
Public constructors
ColorSpaceProfiles
ColorSpaceProfiles(elements: LongArray)
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 android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_COLOR_SPACE_PROFILES
. for a given camera id in order to retrieve the device capabilities.
Parameters | |
---|---|
elements |
LongArray: 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 and others for the individual bitmap components). This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the elements array length is invalid, not divisible by 3 or contains invalid element values |
java.lang.NullPointerException |
if elements is null |
Public methods
getSupportedColorSpaces
fun getSupportedColorSpaces(imageFormat: Int): MutableSet<ColorSpace.Named!>
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.
Return | |
---|---|
MutableSet<ColorSpace.Named!> |
set of color spaces This value cannot be null . |
getSupportedColorSpacesForDynamicRange
fun getSupportedColorSpacesForDynamicRange(
imageFormat: Int,
dynamicRangeProfile: Long
): MutableSet<ColorSpace.Named!>
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.
Return | |
---|---|
MutableSet<ColorSpace.Named!> |
set of color spaces This value cannot be null . |
getSupportedDynamicRangeProfiles
fun getSupportedDynamicRangeProfiles(
colorSpace: ColorSpace.Named,
imageFormat: Int
): MutableSet<Long!>
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.
Return | |
---|---|
MutableSet<Long!> |
set of dynamic range profiles. This value cannot be null . |
getSupportedImageFormatsForColorSpace
fun getSupportedImageFormatsForColorSpace(colorSpace: ColorSpace.Named): MutableSet<Int!>
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.
Parameters | |
---|---|
colorSpace |
ColorSpace.Named: This value cannot be null . |
Return | |
---|---|
MutableSet<Int!> |
set of image formats This value cannot be null . |