mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-12-04 13:48:04 +00:00
!14515 【挑单】pack接口增加错误码
Merge pull request !14515 from 姚星宇/localRelease5.0.1
This commit is contained in:
commit
30fe5593a5
80
api/@ohos.multimedia.image.d.ts
vendored
80
api/@ohos.multimedia.image.d.ts
vendored
@ -8325,6 +8325,28 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise<vo
|
||||
*/
|
||||
packing(source: ImageSource, option: PackingOption): Promise<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Compresses or packs an image and uses a promise to return the result.
|
||||
*
|
||||
* @param { ImageSource } source Image to be processed.
|
||||
* @param { PackingOption } options Option for image packing.
|
||||
* @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data.
|
||||
* @throws { BusinessError } 401 - If the parameter is invalid.
|
||||
* @throws { BusinessError } 62980096 - The Operation failed.
|
||||
* @throws { BusinessError } 62980101 - The image data is abnormal.
|
||||
* @throws { BusinessError } 62980106 - The image is too large.
|
||||
* @throws { BusinessError } 62980113 - Unknown image format.
|
||||
* @throws { BusinessError } 62980119 - If encoder occur error during encoding.
|
||||
* @throws { BusinessError } 62980120 - Add pixelmap out of range.
|
||||
* @throws { BusinessError } 62980172 - Failed to encode icc.
|
||||
* @throws { BusinessError } 62980252 - Failed to create surface.
|
||||
* @syscap SystemCapability.Multimedia.Image.ImagePacker
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 13
|
||||
*/
|
||||
packToData(source: ImageSource, options: PackingOption): Promise<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Compresses or packs an image and uses a callback to return the result.
|
||||
*
|
||||
@ -8389,6 +8411,28 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise<vo
|
||||
*/
|
||||
packing(source: PixelMap, option: PackingOption): Promise<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Compresses or packs an image and uses a promise to return the result.
|
||||
*
|
||||
* @param { PixelMap } source PixelMap to be processed.
|
||||
* @param { PackingOption } options Option for image packing.
|
||||
* @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data.
|
||||
* @throws { BusinessError } 401 - If the parameter is invalid.
|
||||
* @throws { BusinessError } 62980096 - The Operation failed.
|
||||
* @throws { BusinessError } 62980101 - The image data is abnormal.
|
||||
* @throws { BusinessError } 62980106 - The image is too large.
|
||||
* @throws { BusinessError } 62980113 - Unknown image format.
|
||||
* @throws { BusinessError } 62980119 - If encoder occur error during encoding.
|
||||
* @throws { BusinessError } 62980120 - Add pixelmap out of range.
|
||||
* @throws { BusinessError } 62980172 - Failed to encode icc.
|
||||
* @throws { BusinessError } 62980252 - Failed to create surface.
|
||||
* @syscap SystemCapability.Multimedia.Image.ImagePacker
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 13
|
||||
*/
|
||||
packToData(source: PixelMap, options: PackingOption): Promise<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Compresses or packs an image into a file and uses a callback to return the result.
|
||||
*
|
||||
@ -8396,6 +8440,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise<vo
|
||||
* @param { number } fd ID of a file descriptor.
|
||||
* @param { PackingOption } options Options for image packing.
|
||||
* @param { AsyncCallback<void> } callback Callback used to return the operation result.
|
||||
* @throws { BusinessError } 62980096 - The Operation failed.
|
||||
* @throws { BusinessError } 62980101 - The image data is abnormal.
|
||||
* @throws { BusinessError } 62980106 - The image is too large.
|
||||
* @throws { BusinessError } 62980113 - Unknown image format.
|
||||
* @throws { BusinessError } 62980115 - If the parameter is invalid.
|
||||
* @throws { BusinessError } 62980119 - If encoder occur error during encoding.
|
||||
* @throws { BusinessError } 62980120 - Add pixelmap out of range.
|
||||
* @throws { BusinessError } 62980172 - Failed to encode icc.
|
||||
* @throws { BusinessError } 62980252 - Failed to create surface.
|
||||
* @syscap SystemCapability.Multimedia.Image.ImagePacker
|
||||
* @crossplatform
|
||||
* @since 11
|
||||
@ -8409,6 +8462,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise<vo
|
||||
* @param { number } fd ID of a file descriptor.
|
||||
* @param { PackingOption } options Options for image packing.
|
||||
* @returns { Promise<void> } A Promise instance used to return the operation result.
|
||||
* @throws { BusinessError } 62980096 - The Operation failed.
|
||||
* @throws { BusinessError } 62980101 - The image data is abnormal.
|
||||
* @throws { BusinessError } 62980106 - The image is too large.
|
||||
* @throws { BusinessError } 62980113 - Unknown image format.
|
||||
* @throws { BusinessError } 62980115 - If the parameter is invalid.
|
||||
* @throws { BusinessError } 62980119 - If encoder occur error during encoding.
|
||||
* @throws { BusinessError } 62980120 - Add pixelmap out of range.
|
||||
* @throws { BusinessError } 62980172 - Failed to encode icc.
|
||||
* @throws { BusinessError } 62980252 - Failed to create surface.
|
||||
* @syscap SystemCapability.Multimedia.Image.ImagePacker
|
||||
* @crossplatform
|
||||
* @since 11
|
||||
@ -8422,6 +8484,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise<vo
|
||||
* @param { number } fd ID of a file descriptor.
|
||||
* @param { PackingOption } options Options for image packing.
|
||||
* @param { AsyncCallback<void> } callback Callback used to return the operation result.
|
||||
* @throws { BusinessError } 62980096 - The Operation failed.
|
||||
* @throws { BusinessError } 62980101 - The image data is abnormal.
|
||||
* @throws { BusinessError } 62980106 - The image is too large.
|
||||
* @throws { BusinessError } 62980113 - Unknown image format.
|
||||
* @throws { BusinessError } 62980115 - If the parameter is invalid.
|
||||
* @throws { BusinessError } 62980119 - If encoder occur error during encoding.
|
||||
* @throws { BusinessError } 62980120 - Add pixelmap out of range.
|
||||
* @throws { BusinessError } 62980172 - Failed to encode icc.
|
||||
* @throws { BusinessError } 62980252 - Failed to create surface.
|
||||
* @syscap SystemCapability.Multimedia.Image.ImagePacker
|
||||
* @crossplatform
|
||||
* @since 11
|
||||
@ -8435,6 +8506,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise<vo
|
||||
* @param { number } fd ID of a file descriptor.
|
||||
* @param { PackingOption } options Options for image packing.
|
||||
* @returns { Promise<void> } A Promise instance used to return the operation result.
|
||||
* @throws { BusinessError } 62980096 - The Operation failed.
|
||||
* @throws { BusinessError } 62980101 - The image data is abnormal.
|
||||
* @throws { BusinessError } 62980106 - The image is too large.
|
||||
* @throws { BusinessError } 62980113 - Unknown image format.
|
||||
* @throws { BusinessError } 62980115 - If the parameter is invalid.
|
||||
* @throws { BusinessError } 62980119 - If encoder occur error during encoding.
|
||||
* @throws { BusinessError } 62980120 - Add pixelmap out of range.
|
||||
* @throws { BusinessError } 62980172 - Failed to encode icc.
|
||||
* @throws { BusinessError } 62980252 - Failed to create surface.
|
||||
* @syscap SystemCapability.Multimedia.Image.ImagePacker
|
||||
* @crossplatform
|
||||
* @since 11
|
||||
|
Loading…
Reference in New Issue
Block a user