From 78ef848ed6cd34e5d89c7e47c19895a7ce8b950f Mon Sep 17 00:00:00 2001 From: Tombaugh Date: Mon, 11 Dec 2023 20:59:56 +0800 Subject: [PATCH 1/3] add error code Signed-off-by: Tombaugh --- api/@ohos.multimedia.image.d.ts | 160 ++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index fe0f41ef83..5e79d35fe1 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -2948,6 +2948,34 @@ declare namespace image { * @crossplatform * @since 10 */ + /** + * Creates a PixelMap array based on image decoding parameters. This method uses a promise to + * return the array. + * + * @param { DecodingOptions } options Image decoding parameters. + * @returns { Promise> } A Promise instance used to return the PixelMap array. + * @throws { BusinessError } 401 - The parameter check failed. + * @throws { BusinessError } 62980096 - If the operation failed. + * @throws { BusinessError } 62980099 - If the shared memory data abnormal. + * @throws { BusinessError } 62980101 - If the image data abnormal. + * @throws { BusinessError } 62980103 - If the image data unsupport. + * @throws { BusinessError } 62980106 - If the image too large. + * @throws { BusinessError } 62980109 - If the image crop failed. + * @throws { BusinessError } 62980110 - If the image source data error. + * @throws { BusinessError } 62980111 - If the image source data incomplete. + * @throws { BusinessError } 62980112 - If the image format mismatch. + * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980115 - If the image invalid parameter. + * @throws { BusinessError } 62980116 - If the image decode failed. + * @throws { BusinessError } 62980118 - If the image plugin create failed. + * @throws { BusinessError } 62980122 - If the image decode head abnormal. + * @throws { BusinessError } 62980137 - If the media invalid operation. + * @throws { BusinessError } 62980173 - If the DMA memory not exist. + * @throws { BusinessError } 62980174 - If the DMA memory data abnormal. + * @syscap SystemCapability.Multimedia.Image.ImageSource + * @crossplatform + * @since 11 + */ createPixelMapList(options?: DecodingOptions): Promise>; /** @@ -2963,6 +2991,32 @@ declare namespace image { * @crossplatform * @since 10 */ + /** + * Creates a PixelMap array. This method uses a callback to return the array. + * + * @param { AsyncCallback> } callback Callback used to return the PixelMap array. + * @throws { BusinessError } 401 - The parameter check failed. + * @throws { BusinessError } 62980096 - If the operation failed. + * @throws { BusinessError } 62980099 - If the shared memory data abnormal. + * @throws { BusinessError } 62980101 - If the image data abnormal. + * @throws { BusinessError } 62980103 - If the image data unsupport. + * @throws { BusinessError } 62980106 - If the image too large. + * @throws { BusinessError } 62980109 - If the image crop failed. + * @throws { BusinessError } 62980110 - If the image source data error. + * @throws { BusinessError } 62980111 - If the image source data incomplete. + * @throws { BusinessError } 62980112 - If the image format mismatch. + * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980115 - If the image invalid parameter. + * @throws { BusinessError } 62980116 - If the image decode failed. + * @throws { BusinessError } 62980118 - If the image plugin create failed. + * @throws { BusinessError } 62980122 - If the image decode head abnormal. + * @throws { BusinessError } 62980137 - If the media invalid operation. + * @throws { BusinessError } 62980173 - If the DMA memory not exist. + * @throws { BusinessError } 62980174 - If the DMA memory data abnormal. + * @syscap SystemCapability.Multimedia.Image.ImageSource + * @crossplatform + * @since 11 + */ createPixelMapList(callback: AsyncCallback>): void; /** @@ -2980,6 +3034,34 @@ declare namespace image { * @crossplatform * @since 10 */ + /** + * Creates a PixelMap array based on image decoding parameters. This method uses a callback to + * return the array. + * + * @param { DecodingOptions } options Image decoding parameters. + * @param { AsyncCallback> } callback Callback used to return the PixelMap array. + * @throws { BusinessError } 401 - The parameter check failed. + * @throws { BusinessError } 62980096 - If the operation failed. + * @throws { BusinessError } 62980099 - If the shared memory data abnormal. + * @throws { BusinessError } 62980101 - If the image data abnormal. + * @throws { BusinessError } 62980103 - If the image data unsupport. + * @throws { BusinessError } 62980106 - If the image too large. + * @throws { BusinessError } 62980109 - If the image crop failed. + * @throws { BusinessError } 62980110 - If the image source data error. + * @throws { BusinessError } 62980111 - If the image source data incomplete. + * @throws { BusinessError } 62980112 - If the image format mismatch. + * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980115 - If the image invalid parameter. + * @throws { BusinessError } 62980116 - If the image decode failed. + * @throws { BusinessError } 62980118 - If the image plugin create failed. + * @throws { BusinessError } 62980122 - If the image decode head abnormal. + * @throws { BusinessError } 62980137 - If the media invalid operation. + * @throws { BusinessError } 62980173 - If the DMA memory not exist. + * @throws { BusinessError } 62980174 - If the DMA memory data abnormal. + * @syscap SystemCapability.Multimedia.Image.ImageSource + * @crossplatform + * @since 11 + */ createPixelMapList(options: DecodingOptions, callback: AsyncCallback>): void; /** @@ -2997,6 +3079,26 @@ declare namespace image { * @crossplatform * @since 10 */ + /** + * Obtains the array of delay time in an image. This method uses a promise to return the array. + * + * @returns { Promise> } A Promise instance used to return the array. + * @throws { BusinessError } 401 - The parameter check failed. + * @throws { BusinessError } 62980096 - If the operation failed. + * @throws { BusinessError } 62980110 - If the image source data error. + * @throws { BusinessError } 62980111 - If the image source data incomplete. + * @throws { BusinessError } 62980112 - If the image format mismatch. + * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980115 - If the image invalid parameter. + * @throws { BusinessError } 62980116 - If the image decode failed. + * @throws { BusinessError } 62980118 - If the image plugin create failed. + * @throws { BusinessError } 62980122 - If the image decode head abnormal. + * @throws { BusinessError } 62980137 - If the media invalid operation. + * @throws { BusinessError } 62980149 - If the media invalid parameter. + * @syscap SystemCapability.Multimedia.Image.ImageSource + * @crossplatform + * @since 11 + */ getDelayTimeList(): Promise>; /** @@ -3014,6 +3116,26 @@ declare namespace image { * @crossplatform * @since 10 */ + /** + * Obtains the array of delay time in an image. This method uses a callback to to return the array. + * + * @param { AsyncCallback> } callback Callback used to return the array. + * @throws { BusinessError } 401 - The parameter check failed. + * @throws { BusinessError } 62980096 - If the operation failed. + * @throws { BusinessError } 62980110 - If the image source data error. + * @throws { BusinessError } 62980111 - If the image source data incomplete. + * @throws { BusinessError } 62980112 - If the image format mismatch. + * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980115 - If the image invalid parameter. + * @throws { BusinessError } 62980116 - If the image decode failed. + * @throws { BusinessError } 62980118 - If the image plugin create failed. + * @throws { BusinessError } 62980122 - If the image decode head abnormal. + * @throws { BusinessError } 62980137 - If the media invalid operation. + * @throws { BusinessError } 62980149 - If the media invalid parameter. + * @syscap SystemCapability.Multimedia.Image.ImageSource + * @crossplatform + * @since 11 + */ getDelayTimeList(callback: AsyncCallback>): void; /** @@ -3031,6 +3153,25 @@ declare namespace image { * @crossplatform * @since 10 */ + /** + * Obtains the count of frame in an image. This method uses a promise to return the number. + * + * @returns { Promise } A Promise instance used to return the number. + * @throws { BusinessError } 401 - The parameter check failed. + * @throws { BusinessError } 62980096 - If the operation failed. + * @throws { BusinessError } 62980110 - If the image source data error. + * @throws { BusinessError } 62980111 - If the image source data incomplete. + * @throws { BusinessError } 62980112 - If the image format mismatch. + * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980115 - If the image invalid parameter. + * @throws { BusinessError } 62980116 - If the image decode failed. + * @throws { BusinessError } 62980118 - If the image plugin create failed. + * @throws { BusinessError } 62980122 - If the image decode head abnormal. + * @throws { BusinessError } 62980137 - If the media invalid operation. + * @syscap SystemCapability.Multimedia.Image.ImageSource + * @crossplatform + * @since 11 + */ getFrameCount(): Promise; /** @@ -3048,6 +3189,25 @@ declare namespace image { * @crossplatform * @since 10 */ + /** + * Obtains the count of frame in an image. This method uses a callback to to return the number. + * + * @param { AsyncCallback } callback Callback used to return the number. + * @throws { BusinessError } 401 - The parameter check failed. + * @throws { BusinessError } 62980096 - If the operation failed. + * @throws { BusinessError } 62980110 - If the image source data error. + * @throws { BusinessError } 62980111 - If the image source data incomplete. + * @throws { BusinessError } 62980112 - If the image format mismatch. + * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980115 - If the image invalid parameter. + * @throws { BusinessError } 62980116 - If the image decode failed. + * @throws { BusinessError } 62980118 - If the image plugin create failed. + * @throws { BusinessError } 62980122 - If the image decode head abnormal. + * @throws { BusinessError } 62980137 - If the media invalid operation. + * @syscap SystemCapability.Multimedia.Image.ImageSource + * @crossplatform + * @since 11 + */ getFrameCount(callback: AsyncCallback): void; /** -- Gitee From ea8c32efd3f55e6070b7e02388e9341c8d50f4d3 Mon Sep 17 00:00:00 2001 From: Tombaugh Date: Tue, 12 Dec 2023 19:23:06 +0800 Subject: [PATCH 2/3] fix doc Signed-off-by: Tombaugh --- api/@ohos.multimedia.image.d.ts | 117 ++------------------------------ 1 file changed, 7 insertions(+), 110 deletions(-) diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index 5e79d35fe1..870b8ca684 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -2933,21 +2933,6 @@ declare namespace image { */ createPixelMap(options: DecodingOptions, callback: AsyncCallback): void; - /** - * Creates a PixelMap array based on image decoding parameters. This method uses a promise to - * return the array. - * - * @param { DecodingOptions } options Image decoding parameters. - * @returns { Promise> } A Promise instance used to return the PixelMap array. - * @throws { BusinessError } 62980096 - If the operation failed. - * @throws { BusinessError } 62980103 - If the image data unsupport. - * @throws { BusinessError } 62980110 - If the image source data error. - * @throws { BusinessError } 62980111 - If the image source data incomplete. - * @throws { BusinessError } 62980118 - If the image plugin create failed. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 10 - */ /** * Creates a PixelMap array based on image decoding parameters. This method uses a promise to * return the array. @@ -2974,23 +2959,10 @@ declare namespace image { * @throws { BusinessError } 62980174 - If the DMA memory data abnormal. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since 10 */ createPixelMapList(options?: DecodingOptions): Promise>; - /** - * Creates a PixelMap array. This method uses a callback to return the array. - * - * @param { AsyncCallback> } callback Callback used to return the PixelMap array. - * @throws { BusinessError } 62980096 - If the operation failed. - * @throws { BusinessError } 62980103 - If the image data unsupport. - * @throws { BusinessError } 62980110 - If the image source data error. - * @throws { BusinessError } 62980111 - If the image source data incomplete. - * @throws { BusinessError } 62980118 - If the image plugin create failed. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 10 - */ /** * Creates a PixelMap array. This method uses a callback to return the array. * @@ -3015,25 +2987,10 @@ declare namespace image { * @throws { BusinessError } 62980174 - If the DMA memory data abnormal. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since 10 */ createPixelMapList(callback: AsyncCallback>): void; - /** - * Creates a PixelMap array based on image decoding parameters. This method uses a callback to - * return the array. - * - * @param { DecodingOptions } options Image decoding parameters. - * @param { AsyncCallback> } callback Callback used to return the PixelMap array. - * @throws { BusinessError } 62980096 - If the operation failed. - * @throws { BusinessError } 62980103 - If the image data unsupport. - * @throws { BusinessError } 62980110 - If the image source data error. - * @throws { BusinessError } 62980111 - If the image source data incomplete. - * @throws { BusinessError } 62980118 - If the image plugin create failed. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 10 - */ /** * Creates a PixelMap array based on image decoding parameters. This method uses a callback to * return the array. @@ -3060,25 +3017,10 @@ declare namespace image { * @throws { BusinessError } 62980174 - If the DMA memory data abnormal. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since 10 */ createPixelMapList(options: DecodingOptions, callback: AsyncCallback>): void; - /** - * Obtains the array of delay time in an image. This method uses a promise to return the array. - * - * @returns { Promise> } A Promise instance used to return the array. - * @throws { BusinessError } 62980096 - If the operation failed. - * @throws { BusinessError } 62980110 - If the image source data error. - * @throws { BusinessError } 62980111 - If the image source data incomplete. - * @throws { BusinessError } 62980113 - If the image format unknown. - * @throws { BusinessError } 62980116 - If the image decode failed. - * @throws { BusinessError } 62980118 - If the image plugin create failed. - * @throws { BusinessError } 62980122 - If the image decode head abnormal. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 10 - */ /** * Obtains the array of delay time in an image. This method uses a promise to return the array. * @@ -3097,25 +3039,10 @@ declare namespace image { * @throws { BusinessError } 62980149 - If the media invalid parameter. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since 10 */ getDelayTimeList(): Promise>; - /** - * Obtains the array of delay time in an image. This method uses a callback to to return the array. - * - * @param { AsyncCallback> } callback Callback used to return the array. - * @throws { BusinessError } 62980096 - If the operation failed. - * @throws { BusinessError } 62980110 - If the image source data error. - * @throws { BusinessError } 62980111 - If the image source data incomplete. - * @throws { BusinessError } 62980113 - If the image format unknown. - * @throws { BusinessError } 62980116 - If the image decode failed. - * @throws { BusinessError } 62980118 - If the image plugin create failed. - * @throws { BusinessError } 62980122 - If the image decode head abnormal. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 10 - */ /** * Obtains the array of delay time in an image. This method uses a callback to to return the array. * @@ -3134,25 +3061,10 @@ declare namespace image { * @throws { BusinessError } 62980149 - If the media invalid parameter. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since 10 */ getDelayTimeList(callback: AsyncCallback>): void; - /** - * Obtains the count of frame in an image. This method uses a promise to return the number. - * - * @returns { Promise } A Promise instance used to return the number. - * @throws { BusinessError } 62980096 - If the operation failed. - * @throws { BusinessError } 62980110 - If the image source data error. - * @throws { BusinessError } 62980111 - If the image source data incomplete. - * @throws { BusinessError } 62980113 - If the image format unknown. - * @throws { BusinessError } 62980116 - If the image decode failed. - * @throws { BusinessError } 62980118 - If the image plugin create failed. - * @throws { BusinessError } 62980122 - If the image decode head abnormal. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 10 - */ /** * Obtains the count of frame in an image. This method uses a promise to return the number. * @@ -3170,25 +3082,10 @@ declare namespace image { * @throws { BusinessError } 62980137 - If the media invalid operation. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since 10 */ getFrameCount(): Promise; - /** - * Obtains the count of frame in an image. This method uses a callback to to return the number. - * - * @param { AsyncCallback } callback Callback used to return the number. - * @throws { BusinessError } 62980096 - If the operation failed. - * @throws { BusinessError } 62980110 - If the image source data error. - * @throws { BusinessError } 62980111 - If the image source data incomplete. - * @throws { BusinessError } 62980113 - If the image format unknown. - * @throws { BusinessError } 62980116 - If the image decode failed. - * @throws { BusinessError } 62980118 - If the image plugin create failed. - * @throws { BusinessError } 62980122 - If the image decode head abnormal. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 10 - */ /** * Obtains the count of frame in an image. This method uses a callback to to return the number. * @@ -3206,7 +3103,7 @@ declare namespace image { * @throws { BusinessError } 62980137 - If the media invalid operation. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since 10 */ getFrameCount(callback: AsyncCallback): void; -- Gitee From 50f0dfe936ee4f11ed521c13f706069d7240fb5e Mon Sep 17 00:00:00 2001 From: Tombaugh Date: Thu, 14 Dec 2023 11:57:15 +0800 Subject: [PATCH 3/3] fix Signed-off-by: Tombaugh --- api/@ohos.multimedia.image.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index 870b8ca684..cd48608b32 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -2949,7 +2949,7 @@ declare namespace image { * @throws { BusinessError } 62980110 - If the image source data error. * @throws { BusinessError } 62980111 - If the image source data incomplete. * @throws { BusinessError } 62980112 - If the image format mismatch. - * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980113 - If the image format unknown. * @throws { BusinessError } 62980115 - If the image invalid parameter. * @throws { BusinessError } 62980116 - If the image decode failed. * @throws { BusinessError } 62980118 - If the image plugin create failed. @@ -2977,7 +2977,7 @@ declare namespace image { * @throws { BusinessError } 62980110 - If the image source data error. * @throws { BusinessError } 62980111 - If the image source data incomplete. * @throws { BusinessError } 62980112 - If the image format mismatch. - * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980113 - If the image format unknown. * @throws { BusinessError } 62980115 - If the image invalid parameter. * @throws { BusinessError } 62980116 - If the image decode failed. * @throws { BusinessError } 62980118 - If the image plugin create failed. @@ -3007,7 +3007,7 @@ declare namespace image { * @throws { BusinessError } 62980110 - If the image source data error. * @throws { BusinessError } 62980111 - If the image source data incomplete. * @throws { BusinessError } 62980112 - If the image format mismatch. - * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980113 - If the image format unknown. * @throws { BusinessError } 62980115 - If the image invalid parameter. * @throws { BusinessError } 62980116 - If the image decode failed. * @throws { BusinessError } 62980118 - If the image plugin create failed. @@ -3030,7 +3030,7 @@ declare namespace image { * @throws { BusinessError } 62980110 - If the image source data error. * @throws { BusinessError } 62980111 - If the image source data incomplete. * @throws { BusinessError } 62980112 - If the image format mismatch. - * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980113 - If the image format unknown. * @throws { BusinessError } 62980115 - If the image invalid parameter. * @throws { BusinessError } 62980116 - If the image decode failed. * @throws { BusinessError } 62980118 - If the image plugin create failed. @@ -3052,7 +3052,7 @@ declare namespace image { * @throws { BusinessError } 62980110 - If the image source data error. * @throws { BusinessError } 62980111 - If the image source data incomplete. * @throws { BusinessError } 62980112 - If the image format mismatch. - * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980113 - If the image format unknown. * @throws { BusinessError } 62980115 - If the image invalid parameter. * @throws { BusinessError } 62980116 - If the image decode failed. * @throws { BusinessError } 62980118 - If the image plugin create failed. @@ -3074,7 +3074,7 @@ declare namespace image { * @throws { BusinessError } 62980110 - If the image source data error. * @throws { BusinessError } 62980111 - If the image source data incomplete. * @throws { BusinessError } 62980112 - If the image format mismatch. - * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980113 - If the image format unknown. * @throws { BusinessError } 62980115 - If the image invalid parameter. * @throws { BusinessError } 62980116 - If the image decode failed. * @throws { BusinessError } 62980118 - If the image plugin create failed. @@ -3095,7 +3095,7 @@ declare namespace image { * @throws { BusinessError } 62980110 - If the image source data error. * @throws { BusinessError } 62980111 - If the image source data incomplete. * @throws { BusinessError } 62980112 - If the image format mismatch. - * @throws { BusinessError } 62980113 - If the image unknown format. + * @throws { BusinessError } 62980113 - If the image format unknown. * @throws { BusinessError } 62980115 - If the image invalid parameter. * @throws { BusinessError } 62980116 - If the image decode failed. * @throws { BusinessError } 62980118 - If the image plugin create failed. -- Gitee