ColorSpaceProfilesWrapper


public interface ColorSpaceProfilesWrapper extends UnsafeWrapper

Known direct subclasses
FakeColorSpaceProfiles

A fake implementation of ColorSpaceProfilesWrapper for testing.


A compatibility wrapper for color space profiles.

Summary

Public methods

abstract @NonNull Set<@NonNull String>
getSupportedColorSpaces(int imageFormat)

Get the supported color spaces for a given image format.

abstract @NonNull Set<@NonNull String>
getSupportedColorSpacesForDynamicRange(
    int imageFormat,
    long dynamicRangeProfile
)

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

abstract @NonNull Set<@NonNull Long>
getSupportedDynamicRangeProfiles(
    @NonNull String cameraColorSpace,
    int imageFormat
)

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

abstract @NonNull Set<@NonNull Integer>

Get the supported image formats for a given color space.

Inherited methods

From androidx.camera.common.UnsafeWrapper
abstract T
<T extends Object> unwrapAs(@NonNull Class<@NonNull T> type)

Attempts to unwrap this object into the specified underlying type.

Public methods

getSupportedColorSpaces

Added in 1.7.0-rc01
abstract @NonNull Set<@NonNull String> getSupportedColorSpaces(int imageFormat)

Get the supported color spaces for a given image format.

Parameters
int imageFormat

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

Returns
@NonNull Set<@NonNull String>

The set of supported CameraColorSpaces.

getSupportedColorSpacesForDynamicRange

Added in 1.7.0-rc01
abstract @NonNull Set<@NonNull String> getSupportedColorSpacesForDynamicRange(
    int imageFormat,
    long dynamicRangeProfile
)

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

Parameters
int imageFormat

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

long dynamicRangeProfile

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

Returns
@NonNull Set<@NonNull String>

The set of supported CameraColorSpaces.

getSupportedDynamicRangeProfiles

Added in 1.7.0-rc01
abstract @NonNull Set<@NonNull Long> getSupportedDynamicRangeProfiles(
    @NonNull String cameraColorSpace,
    int imageFormat
)

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

Parameters
@NonNull String cameraColorSpace

The 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

int imageFormat

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

Returns
@NonNull Set<@NonNull Long>

A set of framework dynamic range profiles (e.g., android.hardware.camera2.params.DynamicRangeProfiles.HDR10)

getSupportedImageFormatsForColorSpace

Added in 1.7.0-rc01
abstract @NonNull Set<@NonNull Integer> getSupportedImageFormatsForColorSpace(@NonNull String cameraColorSpace)

Get the supported image formats for a given color space.

Parameters
@NonNull String cameraColorSpace

The 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

Returns
@NonNull Set<@NonNull Integer>

The set of supported image formats.