From 38824b386b0762c987e489bfcb7fbf2e0f89f7f6 Mon Sep 17 00:00:00 2001 From: zenggaofeng Date: Wed, 6 Mar 2024 15:37:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86gif?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=AF=86=E5=88=AB=E6=88=90=E9=9D=99=E6=80=81?= =?UTF-8?q?=E5=9B=BE=E5=92=8C=E5=90=8C=E4=B8=80=E5=BC=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=8F=91=E9=80=81=E5=A4=9A=E6=AC=A1=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zenggaofeng --- CHANGELOG.md | 4 ++++ entry/oh-package.json5 | 2 +- library/oh-package.json5 | 2 +- library/src/main/ets/components/imageknife/ImageKnife.ets | 2 +- .../src/main/ets/components/imageknife/utils/FileTypeUtil.ets | 2 +- oh-package.json5 | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06fd9ed..1389665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.2-rc.9 +- 修复部分gif图片识别成静态图 +- 修复同一张图片发送多次请求 + ## 2.1.2-rc.8 - onAreaChange绘制图片改为component Util绘制 diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index 9fbf348..e4e3184 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -4,7 +4,7 @@ "name": "entry", "description": "example description", "repository": {}, - "version": "2.1.2-rc.8", + "version": "2.1.2-rc.9", "dependencies": { "@ohos/libraryimageknife": "file:../sharedlibrary", "@ohos/sharedlibrary2": "file:../sharedlibrary2", diff --git a/library/oh-package.json5 b/library/oh-package.json5 index 308fb82..279b267 100644 --- a/library/oh-package.json5 +++ b/library/oh-package.json5 @@ -14,7 +14,7 @@ "main": "index.ets", "repository": "https://gitee.com/openharmony-tpc/ImageKnife", "type": "module", - "version": "2.1.2-rc.8", + "version": "2.1.2-rc.9", "dependencies": { "pako": "^2.1.0", "@ohos/disklrucache": "^2.0.2-rc.0", diff --git a/library/src/main/ets/components/imageknife/ImageKnife.ets b/library/src/main/ets/components/imageknife/ImageKnife.ets index 1c263cc..29845d7 100644 --- a/library/src/main/ets/components/imageknife/ImageKnife.ets +++ b/library/src/main/ets/components/imageknife/ImageKnife.ets @@ -399,7 +399,7 @@ export class ImageKnife { runningTailNode = runningTailNode.prev; } - if (hasEqual) { + if (!hasEqual) { break; } pendingTailNode = pendingTailNode.prev; diff --git a/library/src/main/ets/components/imageknife/utils/FileTypeUtil.ets b/library/src/main/ets/components/imageknife/utils/FileTypeUtil.ets index 3bb2cfb..44e2b54 100644 --- a/library/src/main/ets/components/imageknife/utils/FileTypeUtil.ets +++ b/library/src/main/ets/components/imageknife/utils/FileTypeUtil.ets @@ -20,7 +20,7 @@ export class FileTypeUtil { // 添加文件类型和对应的文件头部特征 'jpg': [new Uint8Array([0xFF, 0xD8])], 'png': [new Uint8Array([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])], - 'gif': [new Uint8Array([0x47, 0x49, 0x46, 0x38, 0x39, 0x61])], + 'gif': [new Uint8Array([0x47, 0x49, 0x46, 0x38, 0x39, 0x61]),new Uint8Array([0x47, 0x49, 0x46, 0x38])], 'bmp': [new Uint8Array([0x42, 0x4D])], 'svg': [new Uint8Array([0x3C, 0x3F, 0x78, 0x6D, 0x6C]),new Uint8Array([0x3C, 0x73, 0x76, 0x67, 0x20])], 'webp': [new Uint8Array([0x52, 0x49, 0x46, 0x46])], diff --git a/oh-package.json5 b/oh-package.json5 index e295e4e..baf2a86 100644 --- a/oh-package.json5 +++ b/oh-package.json5 @@ -6,6 +6,6 @@ "name": "imageknife", "description": "example description", "repository": {}, - "version": "2.1.2-rc.8", + "version": "2.1.2-rc.9", "dependencies": {} }