Interface (ColorManagementQuery)
ColorManagementQuery provides the APIs for color space query.
NOTE
- The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
- The initial APIs of this interface are supported since API version 12.
Modules to Import
import { camera } from '@kit.CameraKit';
getSupportedColorSpaces12+
getSupportedColorSpaces(): Array<colorSpaceManager.ColorSpace>
Obtains the supported color spaces.
Atomic service API: This API can be used in atomic services since API version 19.
System capability: SystemCapability.Multimedia.Camera.Core
Return value
| Type | Description |
|---|---|
| Array<colorSpaceManager.ColorSpace> | Array of color spaces supported. If the API call fails, undefined is returned. |
Example
import { colorSpaceManager } from '@kit.ArkGraphics2D';
function getSupportedColorSpaces(session: camera.PhotoSession): Array<colorSpaceManager.ColorSpace> {
let colorSpaces: Array<colorSpaceManager.ColorSpace> = [];
colorSpaces = session.getSupportedColorSpaces();
return colorSpaces;
}
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-oh-camera-capturesession-callbacks
openharmony 鸿蒙 arkts-apis-camera-OIS
openharmony 鸿蒙 capi-oh-camera-camera-devicequeryinfo
openharmony 鸿蒙 capi-oh-camera-camera-frameraterange
openharmony 鸿蒙 capi-oh-camera-camera-outputcapability
openharmony 鸿蒙 arkts-apis-camera-Photo
openharmony 鸿蒙 capi-oh-camera-camera-profile
openharmony 鸿蒙 capi-oh-camera-camera-manager