“5ddb433e8926df9345998b90a036358a10106b0a”上不存在“...git@gitcode.net:paddlepaddle/models.git”
未验证 提交 5dbc2bee 编写于 作者: O openharmony_ci 提交者: Gitee

!7897 【轻量级 PR】:【OpenHarmony开源贡献者计划2022】js-apis-image 更改拼写问题

Merge pull request !7897 from gloria/N/A
...@@ -34,7 +34,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise\<Pi ...@@ -34,7 +34,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise\<Pi
```js ```js
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint8Array(color);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts) image.createPixelMap(color, opts)
.then((pixelmap) => { .then((pixelmap) => {
...@@ -61,7 +61,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: As ...@@ -61,7 +61,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: As
```js ```js
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint88Array(color);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts, (pixelmap) => { image.createPixelMap(color, opts, (pixelmap) => {
}) })
...@@ -188,7 +188,7 @@ readPixels(area: PositionArea, callback: AsyncCallback\<void>): void ...@@ -188,7 +188,7 @@ readPixels(area: PositionArea, callback: AsyncCallback\<void>): void
```js ```js
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint88Array(color);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts, (err, pixelmap) => { image.createPixelMap(color, opts, (err, pixelmap) => {
if(pixelmap == undefined){ if(pixelmap == undefined){
...@@ -229,7 +229,7 @@ writePixels(area: PositionArea): Promise\<void> ...@@ -229,7 +229,7 @@ writePixels(area: PositionArea): Promise\<void>
```js ```js
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint88Array(color);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts) image.createPixelMap(color, opts)
.then( pixelmap => { .then( pixelmap => {
...@@ -272,7 +272,7 @@ writePixels(area: PositionArea, callback: AsyncCallback\<void>): void ...@@ -272,7 +272,7 @@ writePixels(area: PositionArea, callback: AsyncCallback\<void>): void
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| --------- | ------------------------------ | ---- | ------------------------------ | | --------- | ------------------------------ | ---- | ------------------------------ |
| area | [PositionArea](#positionarea7) | 是 | 区域,根据区域写入。 | | area | [PositionArea](#positionarea7) | 是 | 区域,根据区域写入。 |
| callback: | AsyncCallback\<void> | 是 | 获取回调,失败时返回错误信息。 | | callback | AsyncCallback\<void> | 是 | 获取回调,失败时返回错误信息。 |
**示例:** **示例:**
...@@ -317,7 +317,7 @@ writeBufferToPixels(src: ArrayBuffer): Promise\<void> ...@@ -317,7 +317,7 @@ writeBufferToPixels(src: ArrayBuffer): Promise\<void>
```js ```js
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
const pixelMap = new ArrayBuffer(400); const pixelMap = new ArrayBuffer(400);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint88Array(color);
pixelMap.writeBufferToPixels(color).then(() => { pixelMap.writeBufferToPixels(color).then(() => {
console.log("Succeeded in writing data from a buffer to a PixelMap."); console.log("Succeeded in writing data from a buffer to a PixelMap.");
}).catch((err) => { }).catch((err) => {
...@@ -345,7 +345,7 @@ writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback\<void>): void ...@@ -345,7 +345,7 @@ writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback\<void>): void
```js ```js
const color = new ArrayBuffer(96);\ const color = new ArrayBuffer(96);\
const pixelMap = new ArrayBuffer(400); const pixelMap = new ArrayBuffer(400);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint88Array(color);
pixelMap.writeBufferToPixels(color, function(err) { pixelMap.writeBufferToPixels(color, function(err) {
if (err) { if (err) {
console.error("Failed to write data from a buffer to a PixelMap."); console.error("Failed to write data from a buffer to a PixelMap.");
...@@ -399,7 +399,7 @@ getImageInfo(callback: AsyncCallback\<ImageInfo>): void ...@@ -399,7 +399,7 @@ getImageInfo(callback: AsyncCallback\<ImageInfo>): void
```js ```js
pixelmap.getImageInfo((imageInfo) => { pixelmap.getImageInfo((imageInfo) => {
console.log("Succeeded in obtaining the image pixel map information.."); console.log("Succeeded in obtaining the image pixel map information.");
}) })
``` ```
...@@ -421,7 +421,7 @@ getBytesNumberPerRow(): number ...@@ -421,7 +421,7 @@ getBytesNumberPerRow(): number
```js ```js
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint88Array(color);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts, (err,pixelmap) => { image.createPixelMap(color, opts, (err,pixelmap) => {
let rowCount = pixelmap.getBytesNumberPerRow(); let rowCount = pixelmap.getBytesNumberPerRow();
...@@ -466,7 +466,7 @@ release():Promise\<void> ...@@ -466,7 +466,7 @@ release():Promise\<void>
```js ```js
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint88Array(color);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts, (pixelmap) => { image.createPixelMap(color, opts, (pixelmap) => {
pixelmap.release().then(() => { pixelmap.release().then(() => {
...@@ -495,7 +495,7 @@ release(callback: AsyncCallback\<void>): void ...@@ -495,7 +495,7 @@ release(callback: AsyncCallback\<void>): void
```js ```js
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let bufferArr = new Unit8Array(color); let bufferArr = new Uint88Array(color);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts, (pixelmap) => { image.createPixelMap(color, opts, (pixelmap) => {
pixelmap.release().then(() => { pixelmap.release().then(() => {
...@@ -1009,7 +1009,7 @@ imagePackerApi.packing(pixelMapApi, packOpts) ...@@ -1009,7 +1009,7 @@ imagePackerApi.packing(pixelMapApi, packOpts)
.then( data => { .then( data => {
console.log('Succeeded in packing the image.'); console.log('Succeeded in packing the image.');
}).catch(error => { }).catch(error => {
console.log('Failed to pack the image..'); console.log('Failed to pack the image.');
}) })
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册