未验证 提交 ccd04068 编写于 作者: 黄开兴 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-image.md.

Signed-off-by: N黄开兴 <huangkaixing@huawei.com>
上级 b28f393b
...@@ -892,16 +892,6 @@ getColorSpace(): colorSpaceManager.ColorSpaceManager ...@@ -892,16 +892,6 @@ getColorSpace(): colorSpaceManager.ColorSpaceManager
| ----------------------------------- | ---------------- | | ----------------------------------- | ---------------- |
| [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | 图像广色域信息。 | | [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | 图像广色域信息。 |
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980101| If the image data abnormal |
| 62980103| If the image data unsupport |
| 62980115| If the image parameter invalid |
**示例:** **示例:**
```js ```js
...@@ -925,15 +915,6 @@ setColorSpace(colorSpace: colorSpaceManager.ColorSpaceManager): void ...@@ -925,15 +915,6 @@ setColorSpace(colorSpace: colorSpaceManager.ColorSpaceManager): void
| ---------- | ----------------------------------- | ---- | --------------- | | ---------- | ----------------------------------- | ---- | --------------- |
| colorSpace | [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | 是 | 图像广色域信息。| | colorSpace | [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | 是 | 图像广色域信息。|
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980111| If the operation invalid |
| 62980115| If the image parameter invalid |
**示例:** **示例:**
```js ```js
...@@ -1713,18 +1694,6 @@ createPixelMapList(options?: DecodingOptions): Promise<Array\<PixelMap>>; ...@@ -1713,18 +1694,6 @@ createPixelMapList(options?: DecodingOptions): Promise<Array\<PixelMap>>;
| -------- | ------------------------------------- | ---- | -------------------------- | | -------- | ------------------------------------- | ---- | -------------------------- |
| options | [DecodingOptions](#decodingoptions7) | 否 | 解码参数。 | | options | [DecodingOptions](#decodingoptions7) | 否 | 解码参数。 |
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980096| If the operation invalid |
| 62980103| If the image data unsupport |
| 62980110| If the image source data error |
| 62980111| If the image source data incomplete |
| 62980118| If the image plugin create failed |
**返回值:** **返回值:**
| 类型 | 说明 | | 类型 | 说明 |
...@@ -1759,18 +1728,6 @@ createPixelMapList(callback: AsyncCallback<Array\<PixelMap>>): void ...@@ -1759,18 +1728,6 @@ createPixelMapList(callback: AsyncCallback<Array\<PixelMap>>): void
| -------- | ------------------------------------- | ---- | -------------------------- | | -------- | ------------------------------------- | ---- | -------------------------- |
| callback | AsyncCallback<Array<[PixelMap](#pixelmap7)>> | 是 | 通过回调返回PixelMap数组。 | | callback | AsyncCallback<Array<[PixelMap](#pixelmap7)>> | 是 | 通过回调返回PixelMap数组。 |
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980096| If the operation invalid |
| 62980103| If the image data unsupport |
| 62980110| If the image source data error |
| 62980111| If the image source data incomplete |
| 62980118| If the image plugin create failed |
**示例:** **示例:**
```js ```js
...@@ -1794,18 +1751,6 @@ createPixelMapList(options: DecodingOptions, callback: AsyncCallback<Array\<Pixe ...@@ -1794,18 +1751,6 @@ createPixelMapList(options: DecodingOptions, callback: AsyncCallback<Array\<Pixe
| options | [DecodingOptions](#decodingoptions7) | 是 | 解码参数。 | | options | [DecodingOptions](#decodingoptions7) | 是 | 解码参数。 |
| callback | AsyncCallback<Array<[PixelMap](#pixelmap7)>> | 是 | 通过回调返回PixelMap数组。 | | callback | AsyncCallback<Array<[PixelMap](#pixelmap7)>> | 是 | 通过回调返回PixelMap数组。 |
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980096| If the operation invalid |
| 62980103| If the image data unsupport |
| 62980110| If the image source data error |
| 62980111| If the image source data incomplete |
| 62980118| If the image plugin create failed |
**示例:** **示例:**
```js ```js
...@@ -1836,20 +1781,6 @@ getDelayTimeList(callback: AsyncCallback<Array\<number>>): void; ...@@ -1836,20 +1781,6 @@ getDelayTimeList(callback: AsyncCallback<Array\<number>>): void;
| -------- | -------------------- | ---- | ---------------------------------- | | -------- | -------------------- | ---- | ---------------------------------- |
| callback | AsyncCallback<Array\<number>> | 是 | 通过回调返回延迟时间数组。 | | callback | AsyncCallback<Array\<number>> | 是 | 通过回调返回延迟时间数组。 |
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980096| If the operation invalid |
| 62980110| If the image source data error |
| 62980111| If the image source data incomplete |
| 62980113| If the image format unknown |
| 62980116| If the image decode failed |
| 62980118| If the image plugin create failed |
| 62980118| If the image decode head abnormal |
**示例:** **示例:**
```js ```js
...@@ -1872,20 +1803,6 @@ getDelayTimeList(): Promise<Array\<number>>; ...@@ -1872,20 +1803,6 @@ getDelayTimeList(): Promise<Array\<number>>;
| -------------- | --------------------------- | | -------------- | --------------------------- |
| Promise<Array\<number>> | Promise实例,异步返回延迟时间数组。 | | Promise<Array\<number>> | Promise实例,异步返回延迟时间数组。 |
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980096| If the operation invalid |
| 62980110| If the image source data error |
| 62980111| If the image source data incomplete |
| 62980113| If the image format unknown |
| 62980116| If the image decode failed |
| 62980118| If the image plugin create failed |
| 62980122| If the image decode head abnormal |
**示例:** **示例:**
```js ```js
...@@ -1906,20 +1823,6 @@ getFrameCount(callback: AsyncCallback\<number>): void; ...@@ -1906,20 +1823,6 @@ getFrameCount(callback: AsyncCallback\<number>): void;
| -------- | -------------------- | ---- | ---------------------------------- | | -------- | -------------------- | ---- | ---------------------------------- |
| callback | AsyncCallback\<number> | 是 | 通过回调返回图像帧数。 | | callback | AsyncCallback\<number> | 是 | 通过回调返回图像帧数。 |
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980096| If the operation invalid |
| 62980110| If the image source data error |
| 62980111| If the image source data incomplete |
| 62980113| If the image format unknown |
| 62980116| If the image decode failed |
| 62980118| If the image plugin create failed |
| 62980122| If the image decode head abnormal |
**示例:** **示例:**
```js ```js
...@@ -1942,20 +1845,6 @@ getFrameCount(): Promise\<number>; ...@@ -1942,20 +1845,6 @@ getFrameCount(): Promise\<number>;
| -------------- | --------------------------- | | -------------- | --------------------------- |
| Promise\<number> | Promise实例,异步返回图像帧数。 | | Promise\<number> | Promise实例,异步返回图像帧数。 |
**错误码:**
以下错误码的详细介绍请参见文档底部图片错误码。
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 62980096| If the operation invalid |
| 62980110| If the image source data error |
| 62980111| If the image source data incomplete |
| 62980113| If the image format unknown |
| 62980116| If the image decode failed |
| 62980118| If the image plugin create failed |
| 62980122| If the image decode head abnormal |
**示例:** **示例:**
```js ```js
...@@ -2949,9 +2838,9 @@ PixelMap的初始化选项。 ...@@ -2949,9 +2838,9 @@ PixelMap的初始化选项。
| 名称 | 类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------ | ---------------------------------- | ---- | ---- | ---------------- | | ------------------ | ---------------------------------- | ---- | ---- | ---------------- |
| sampleSize | number | 是 | 是 | 缩略图采样大小。 | | sampleSize | number | 是 | 是 | 缩略图采样大小,当前只能取1。 |
| rotate | number | 是 | 是 | 旋转角度。 | | rotate | number | 是 | 是 | 旋转角度。 |
| editable | boolean | 是 | 是 | 是否可编辑。 | | editable | boolean | 是 | 是 | 是否可编辑。当取值为false时,图片不可二次编辑,如crop等操作将失败。 |
| desiredSize | [Size](#size) | 是 | 是 | 期望输出大小。 | | desiredSize | [Size](#size) | 是 | 是 | 期望输出大小。 |
| desiredRegion | [Region](#region7) | 是 | 是 | 解码区域。 | | desiredRegion | [Region](#region7) | 是 | 是 | 解码区域。 |
| desiredPixelFormat | [PixelMapFormat](#pixelmapformat7) | 是 | 是 | 解码的像素格式。 | | desiredPixelFormat | [PixelMapFormat](#pixelmapformat7) | 是 | 是 | 解码的像素格式。 |
...@@ -2980,7 +2869,7 @@ PixelMap的初始化选项。 ...@@ -2980,7 +2869,7 @@ PixelMap的初始化选项。
| ------- | ------ | ---- | ---- | --------------------------------------------------- | | ------- | ------ | ---- | ---- | --------------------------------------------------- |
| format | string | 是 | 是 | 目标格式。</br>当前只支持jpg和webp。 | | format | string | 是 | 是 | 目标格式。</br>当前只支持jpg和webp。 |
| quality | number | 是 | 是 | JPEG编码中设定输出图片质量的参数,取值范围为1-100。 | | quality | number | 是 | 是 | JPEG编码中设定输出图片质量的参数,取值范围为1-100。 |
| bufferSize<sup>9+</sup> | number | 是 | 是 | 用于设置图片大小,默认为10M | | bufferSize<sup>9+</sup> | number | 是 | 是 | 用于设置图片大小,默认为10M |
## GetImagePropertyOptions<sup>7+</sup> ## GetImagePropertyOptions<sup>7+</sup>
...@@ -3009,34 +2898,34 @@ PixelMap的初始化选项。 ...@@ -3009,34 +2898,34 @@ PixelMap的初始化选项。
| GPS_LONGITUDE | "GPSLongitude" | 图片经度。 | | GPS_LONGITUDE | "GPSLongitude" | 图片经度。 |
| GPS_LATITUDE_REF | "GPSLatitudeRef" | 纬度引用,例如N或S。 | | GPS_LATITUDE_REF | "GPSLatitudeRef" | 纬度引用,例如N或S。 |
| GPS_LONGITUDE_REF | "GPSLongitudeRef" | 经度引用,例如W或E。 | | GPS_LONGITUDE_REF | "GPSLongitudeRef" | 经度引用,例如W或E。 |
| DATE_TIME_ORIGINAL<sup>9+</sup> | "DateTimeOriginal" | 拍摄时间,例如2022:09:06 15:48:00 | | DATE_TIME_ORIGINAL<sup>9+</sup> | "DateTimeOriginal" | 拍摄时间,例如2022:09:06 15:48:00。当前为只读属性。 |
| EXPOSURE_TIME<sup>9+</sup> | "ExposureTime" | 曝光时间,例如1/33 sec.| | EXPOSURE_TIME<sup>9+</sup> | "ExposureTime" | 曝光时间,例如1/33 sec。当前为只读属性。 |
| SCENE_TYPE<sup>9+</sup> | "SceneType" | 拍摄场景模式,例如人像、风光、运动、夜景等。 | | SCENE_TYPE<sup>9+</sup> | "SceneType" | 拍摄场景模式,例如人像、风光、运动、夜景等。当前为只读属性。 |
| ISO_SPEED_RATINGS<sup>9+</sup> | "ISOSpeedRatings" | ISO感光度,例如400 | | ISO_SPEED_RATINGS<sup>9+</sup> | "ISOSpeedRatings" | ISO感光度,例如400。当前为只读属性。 |
| F_NUMBER<sup>9+</sup> | "FNumber" | 光圈值,例如f/1.8 | | F_NUMBER<sup>9+</sup> | "FNumber" | 光圈值,例如f/1.8。当前为只读属性。 |
| DATE_TIME<sup>10+</sup> | "DateTime" | 日期时间 | | DATE_TIME<sup>10+</sup> | "DateTime" | 日期时间,当前为只读属性。 |
| GPS_TIME_STAMP<sup>10+</sup> | "GPSTimeStamp" | GPS时间戳 | | GPS_TIME_STAMP<sup>10+</sup> | "GPSTimeStamp" | GPS时间戳,当前为只读属性。 |
| GPS_DATE_STAMP<sup>10+</sup> | "GPSDateStamp" | GPS日期戳 | | GPS_DATE_STAMP<sup>10+</sup> | "GPSDateStamp" | GPS日期戳,当前为只读属性。 |
| IMAGE_DESCRIPTION<sup>10+</sup> | "ImageDescription" | 图像信息描述 | | IMAGE_DESCRIPTION<sup>10+</sup> | "ImageDescription" | 图像信息描述,当前为只读属性。 |
| MAKE<sup>10+</sup> | "Make" | 生产商 | | MAKE<sup>10+</sup> | "Make" | 生产商,当前为只读属性。 |
| PHOTO_MODE<sup>10+</sup> | "PhotoMode " | 拍照模式 | | PHOTO_MODE<sup>10+</sup> | "PhotoMode " | 拍照模式,当前为只读属性。 |
| SENSITIVITY_TYPE<sup>10+</sup> | "SensitivityType" | 灵敏度类型 | | SENSITIVITY_TYPE<sup>10+</sup> | "SensitivityType" | 灵敏度类型,当前为只读属性。 |
| STANDARD_OUTPUT_SENSITIVITY<sup>10+</sup> | "StandardOutputSensitivity" | 标准输出灵敏度 | | STANDARD_OUTPUT_SENSITIVITY<sup>10+</sup> | "StandardOutputSensitivity" | 标准输出灵敏度,当前为只读属性。 |
| RECOMMENDED_EXPOSURE_INDEX<sup>10+</sup> | "RecommendedExposureIndex" | 推荐曝光指数 | | RECOMMENDED_EXPOSURE_INDEX<sup>10+</sup> | "RecommendedExposureIndex" | 推荐曝光指数,当前为只读属性。 |
| ISO_SPEED<sup>10+</sup> | "ISOSpeedRatings" | ISO速度等级 | | ISO_SPEED<sup>10+</sup> | "ISOSpeedRatings" | ISO速度等级,当前为只读属性。 |
| APERTURE_VALUE<sup>10+</sup> | "ApertureValue" | 光圈值 | | APERTURE_VALUE<sup>10+</sup> | "ApertureValue" | 光圈值,当前为只读属性。 |
| EXPOSURE_BIAS_VALUE<sup>10+</sup> | "ExposureBiasValue" | 曝光偏差值 | | EXPOSURE_BIAS_VALUE<sup>10+</sup> | "ExposureBiasValue" | 曝光偏差值,当前为只读属性。 |
| METERING_MODE<sup>10+</sup> | "MeteringMode" | 测光模式 | | METERING_MODE<sup>10+</sup> | "MeteringMode" | 测光模式,当前为只读属性。 |
| LIGHT_SOURCE<sup>10+</sup> | "LightSource" | 光源 | | LIGHT_SOURCE<sup>10+</sup> | "LightSource" | 光源,当前为只读属性。 |
| FLASH <sup>10+</sup> | "Flash" | 闪光灯,记录闪光灯状态 | | FLASH <sup>10+</sup> | "Flash" | 闪光灯,记录闪光灯状态,当前为只读属性。 |
| FOCAL_LENGTH <sup>10+</sup> | "FocalLength" | 焦距 | | FOCAL_LENGTH <sup>10+</sup> | "FocalLength" | 焦距,当前为只读属性。 |
| USER_COMMENT <sup>10+</sup> | "UserComment" | 用户注释 | | USER_COMMENT <sup>10+</sup> | "UserComment" | 用户注释,当前为只读属性。 |
| PIXEL_X_DIMENSION <sup>10+</sup> | "PixelXDimension" | 像素X尺寸 | | PIXEL_X_DIMENSION <sup>10+</sup> | "PixelXDimension" | 像素X尺寸,当前为只读属性。 |
| PIXEL_Y_DIMENSION<sup>10+</sup> | "PixelYDimension" | 像素Y尺寸 | | PIXEL_Y_DIMENSION<sup>10+</sup> | "PixelYDimension" | 像素Y尺寸,当前为只读属性。 |
| WHITE_BALANCE <sup>10+</sup> | "WhiteBalance" | 白平衡 | | WHITE_BALANCE <sup>10+</sup> | "WhiteBalance" | 白平衡,当前为只读属性。 |
| FOCAL_LENGTH_IN_35_MM_FILM <sup>10+</sup> | "FocalLengthIn35mmFilm" | 焦距35毫米胶片 | | FOCAL_LENGTH_IN_35_MM_FILM <sup>10+</sup> | "FocalLengthIn35mmFilm" | 焦距35毫米胶片,当前为只读属性。 |
| CAPTURE_MODE <sup>10+</sup> | "HwMnoteCaptureMode" | 捕获模式 | | CAPTURE_MODE <sup>10+</sup> | "HwMnoteCaptureMode" | 捕获模式,当前为只读属性。 |
| PHYSICAL_APERTURE <sup>10+</sup> | "HwMnotePhysicalAperture" | 物理孔径,光圈大小 | | PHYSICAL_APERTURE <sup>10+</sup> | "HwMnotePhysicalAperture" | 物理孔径,光圈大小,当前为只读属性。 |
## ImageFormat<sup>9+</sup> ## ImageFormat<sup>9+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册