diff --git a/en/application-dev/reference/apis/js-apis-image.md b/en/application-dev/reference/apis/js-apis-image.md index 20776d6cc80e501da6ae7accd069ebb502894f86..bcbf619bf7173a405eee37f5dac86c5e87a023e9 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 => {