ColorSpaceProfiles  |  API reference  |  Android Developers


public final class ColorSpaceProfiles
extends Object



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.

All camera devices supporting the CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES capability must advertise the supported color space profiles in getSupportedColorSpaces(int)

Summary

Constants

int UNSPECIFIED

Public constructors

ColorSpaceProfiles(long[] elements)

Create a new immutable ColorSpaceProfiles instance.

Public methods

Set<ColorSpace.Named> getSupportedColorSpaces(int imageFormat)

Return a list of color spaces that are compatible with an ImageFormat.

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.

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

Return a list of dynamic range profiles that are compatible with a color space and ImageFormat.

Set<Integer> getSupportedImageFormatsForColorSpace(ColorSpace.Named colorSpace)

Return a list of image formats that are compatible with a color space.

Inherited methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(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(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()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

UNSPECIFIED

public static final int UNSPECIFIED

Constant Value: -1 (0xffffffff)

Public constructors

ColorSpaceProfiles

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. for a given camera id in order to retrieve the device capabilities.

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 and others for the individual bitmap components).
This value cannot be null.
Throws
IllegalArgumentException if the elements array length is invalid, not divisible by 3 or contains invalid element values
NullPointerException if elements is null

Public methods

getSupportedImageFormatsForColorSpace

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.

Parameters
colorSpace ColorSpace.Named: This value cannot be null.
Returns
Set<Integer> set of image formats.
This value cannot be null.