From a0a77674d1b7453c38ccb22bfede59cc0a06a19c Mon Sep 17 00:00:00 2001 From: caochuan Date: Mon, 25 Aug 2025 18:09:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AA=92=E4=BD=93=E5=BA=93photoAsset=E5=85=83?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=89=93=E6=A0=87=E6=94=AF=E6=8C=81=E7=BC=A9?= =?UTF-8?q?=E7=95=A5=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caochuan --- api/@ohos.file.photoAccessHelper.d.ts | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index 9f5f9c66e7..b89baa5b5f 100644 --- a/api/@ohos.file.photoAccessHelper.d.ts +++ b/api/@ohos.file.photoAccessHelper.d.ts @@ -1658,6 +1658,20 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ + /** + * Obtains the thumbnail of this file. This API uses an asynchronous callback to return the result. + * + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { AsyncCallback } callback - Callback used to return the PixelMap of the thumbnail. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 14000011 - System inner fail + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ getThumbnail(callback: AsyncCallback): void; /** * Obtains the file thumbnail of the given size. This API uses an asynchronous callback to return the result. @@ -1673,6 +1687,21 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ + /** + * Obtains the file thumbnail of the given size. This API uses an asynchronous callback to return the result. + * + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { image.Size } size - Size of the thumbnail. + * @param { AsyncCallback } callback - Callback used to return the PixelMap of the thumbnail. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 14000011 - System inner fail + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ getThumbnail(size: image.Size, callback: AsyncCallback): void; /** * Obtains the file thumbnail of the given size. This API uses a promise to return the result. @@ -1689,6 +1718,22 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ + /** + * Obtains the file thumbnail of the given size. This API uses a promise to return the result. + * + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { image.Size } [size] - Size of the thumbnail. + * @returns { Promise } Returns the thumbnail's pixelMap. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 14000011 - System inner fail + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ getThumbnail(size?: image.Size): Promise; /** * Obtains the ArrayBuffer of a file thumbnail by specifying its type. This API uses a promise to return the result. -- Gitee