From ca3436ff7312248fe299b59553724e5337304880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=8E=E6=9C=88=E6=B8=85=E9=A3=8E?= <2928139825@qq.com> Date: Sat, 2 Sep 2023 13:15:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AF=B4=E6=98=8E=EF=BC=9A?= =?UTF-8?q?=201=E3=80=81=E4=BF=AE=E5=A4=8D=E4=BA=86pngj=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=BF=AB=E9=80=9F=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=BA=94=E7=94=A8=E9=97=AA=E9=80=80=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 明月清风 <2928139825@qq.com> --- AppScope/app.json5 | 2 +- CHANGELOG.md | 7 +++++++ entry/oh-package.json5 | 2 +- imageknife/oh-package.json5 | 2 +- .../main/ets/components/imageknife/pngj/Pngj.ets | 15 +++++++++------ oh-package.json5 | 2 +- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/AppScope/app.json5 b/AppScope/app.json5 index 66c5ba2..f67021a 100644 --- a/AppScope/app.json5 +++ b/AppScope/app.json5 @@ -3,7 +3,7 @@ "bundleName": "com.openharmony.imageknife", "vendor": "example", "versionCode": 1000000, - "versionName": "2.0.3", + "versionName": "2.0.4", "icon": "$media:app_icon", "label": "$string:app_name", "distributedNotificationEnabled": true diff --git a/CHANGELOG.md b/CHANGELOG.md index f4f05d7..30accad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 2.0.4 + +- 修复若干问题: + +​ 修复了pngj测试页面,快速点击导致应用闪退的问题 + + ## 2.0.3 - 修复若干问题: diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index 4a15427..d6c5af6 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -4,7 +4,7 @@ "name": "entry", "description": "example description", "repository": {}, - "version": "2.0.3", + "version": "2.0.4", "dependencies": { "@ohos/imageknife": "file:../imageknife", "@ohos/disklrucache": "^2.0.0" diff --git a/imageknife/oh-package.json5 b/imageknife/oh-package.json5 index 02fab71..efcec38 100644 --- a/imageknife/oh-package.json5 +++ b/imageknife/oh-package.json5 @@ -14,7 +14,7 @@ "main": "index.ets", "repository": "https://gitee.com/openharmony-tpc/ImageKnife", "type": "module", - "version": "2.0.3", + "version": "2.0.4", "dependencies": { "@ohos/disklrucache": "^2.0.0", "@ohos/svg": "^2.0.0", diff --git a/imageknife/src/main/ets/components/imageknife/pngj/Pngj.ets b/imageknife/src/main/ets/components/imageknife/pngj/Pngj.ets index 5dfdd11..16f03c6 100644 --- a/imageknife/src/main/ets/components/imageknife/pngj/Pngj.ets +++ b/imageknife/src/main/ets/components/imageknife/pngj/Pngj.ets @@ -21,12 +21,15 @@ import ArkWorker from '@ohos.worker' export class Pngj { readPngImageInfo(arraybuffer: ArrayBuffer, callback:PngCallback) { let imageSource = image.createImageSource(arraybuffer as any); - imageSource.getImageInfo((err, value) => { - if (err) { - return; - } - callback(arraybuffer, value); - }); + if (imageSource != undefined){ + imageSource.getImageInfo((err, value) => { + if (err) { + return; + } + callback(arraybuffer, value); + }); + } + } /** diff --git a/oh-package.json5 b/oh-package.json5 index e44ef5e..2a552ce 100644 --- a/oh-package.json5 +++ b/oh-package.json5 @@ -6,6 +6,6 @@ "name": "imageknife", "description": "example description", "repository": {}, - "version": "2.0.3", + "version": "2.0.4", "dependencies": {} }