From 0f600fe57933eeb345a298de17d3088b68fab993 Mon Sep 17 00:00:00 2001 From: Gloria Date: Wed, 21 Sep 2022 19:52:41 +0800 Subject: [PATCH] Update docs against 9564+9653 Signed-off-by: wusongqing --- en/application-dev/reference/apis/js-apis-image.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/en/application-dev/reference/apis/js-apis-image.md b/en/application-dev/reference/apis/js-apis-image.md index 20776d6cc8..bcbf619bf7 100644 --- a/en/application-dev/reference/apis/js-apis-image.md +++ b/en/application-dev/reference/apis/js-apis-image.md @@ -170,7 +170,12 @@ Reads image pixel map data in an area. This API uses a promise to return the dat **Example** ```js -const area = new ArrayBuffer(400); +const area = { + pixels: new ArrayBuffer(8), + offset: 0, + stride: 8, + region: { size: { height: 1, width: 2 }, x: 0, y: 0 } +} pixelmap.readPixels(area).then(() => { console.log('Succeeded in reading the image data in the area.'); // Called if the condition is met. }).catch(error => { -- GitLab