From d47fd3b1fdbf4bbe4d482a372635d9fb1fa4f862 Mon Sep 17 00:00:00 2001 From: fengzewu Date: Mon, 22 May 2023 15:36:57 +0800 Subject: [PATCH] add interfaces Signed-off-by: fengzewu --- .../reference/apis/js-apis-image.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/zh-cn/application-dev/reference/apis/js-apis-image.md b/zh-cn/application-dev/reference/apis/js-apis-image.md index 0502ba99b8..34d0c3e2a8 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-image.md +++ b/zh-cn/application-dev/reference/apis/js-apis-image.md @@ -878,6 +878,53 @@ async function Demo() { } ``` +### getColorSpace10+ + +getColorSpace(): colorSpaceManager.ColorSpaceManager + +获取图像广色域信息。 + +**系统能力:** SystemCapability.Multimedia.Image.Core + +**返回值:** + +| 类型 | 说明 | +| ----------------------------------- | ---------------- | +| [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | 图像广色域信息。 | + +**示例:** + +```js +import colorSpaceManager from '@ohos.graphics.colorSpaceManager'; +async function Demo() { + let csm = pixelmap.getColorSpace(); +} +``` + +### setColorSpace10+ + +setColorSpace(colorSpace: colorSpaceManager.ColorSpaceManager): void + +设置图像广色域信息。 + +**系统能力:** SystemCapability.Multimedia.Image.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ----------------------------------- | ---- | --------------- | +| colorSpace | [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | 是 | 图像广色域信息。| + +**示例:** + +```js +import colorSpaceManager from '@ohos.graphics.colorSpaceManager'; +async function Demo() { + var csm = colorSpaceManager.create(colorSpaceName); + pixelmap.setColorSpace(csm); +} +``` + ### release7+ release():Promise\ -- GitLab