From 4b61200b13fb09d6c03eaf858fb49fe139393c00 Mon Sep 17 00:00:00 2001 From: lloyd <754415+llince@user.noreply.gitee.com> Date: Thu, 13 Mar 2025 15:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=AE=9E=E7=8E=B0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=8E=8B=E7=BC=A9=E3=80=91=E6=9B=B4=E6=96=B0=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 6 +++--- README.md | 6 +++--- build-profile.json5 | 2 +- entry/src/main/ets/pages/Index.ets | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.en.md b/README.en.md index 06ad6af..f54ce3c 100644 --- a/README.en.md +++ b/README.en.md @@ -38,8 +38,8 @@ N/A 1. The sample app is supported only on Huawei phones running the standard system. -2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later. +2. The HarmonyOS version must be HarmonyOS 5.0.2 Release or later. -3. The DevEco Studio version must be DevEco Studio 5.0.0 Release or later. +3. The DevEco Studio version must be DevEco Studio 5.0.2 Release or later. -4. The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release SDK or later. +4. The HarmonyOS SDK version must be HarmonyOS 5.0.2 Release SDK or later. diff --git a/README.md b/README.md index 32faa0a..cf582a6 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ 1.本示例仅支持标准系统上运行,支持设备:华为手机。 -2.HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 +2.HarmonyOS系统:HarmonyOS 5.0.2 Release及以上。 -3.DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 +3.DevEco Studio版本:DevEco Studio 5.0.2 Release及以上。 -4.HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 \ No newline at end of file +4.HarmonyOS SDK版本:HarmonyOS 5.0.2 Release SDK及以上。 \ No newline at end of file diff --git a/build-profile.json5 b/build-profile.json5 index b2cc029..248da3f 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -6,7 +6,7 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.2(14)", "runtimeOS": "HarmonyOS", } ], diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index fbd980d..0ae0794 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -31,7 +31,7 @@ async function compressedImage(sourcePixelMap: image.PixelMap, maxCompressedImag const imagePackerApi = image.createImagePacker(); const IMAGE_QUALITY = 0; const packOpts: image.PackingOption = { format: "image/jpeg", quality: IMAGE_QUALITY }; - let compressedImageData: ArrayBuffer = await imagePackerApi.packing(sourcePixelMap, packOpts); + let compressedImageData: ArrayBuffer = await imagePackerApi.packToData(sourcePixelMap, packOpts); const maxCompressedImageByte = maxCompressedImageSize * CommonConstants.BYTE_CONVERSION; if (maxCompressedImageByte > compressedImageData.byteLength) { compressedImageData = await packingImage(compressedImageData, sourcePixelMap, IMAGE_QUALITY, maxCompressedImageByte); @@ -55,7 +55,7 @@ async function compressedImage(sourcePixelMap: image.PixelMap, maxCompressedImag async function packing(sourcePixelMap: image.PixelMap, imageQuality: number): Promise { const imagePackerApi = image.createImagePacker(); const packOpts: image.PackingOption = { format: "image/jpeg", quality: imageQuality }; - const data: ArrayBuffer = await imagePackerApi.packing(sourcePixelMap, packOpts); + const data: ArrayBuffer = await imagePackerApi.packToData(sourcePixelMap, packOpts); return data; } -- Gitee