From 2ed2494ef158675a5dbad792a8b1cb4058a7a188 Mon Sep 17 00:00:00 2001 From: zenggaofeng Date: Mon, 19 Feb 2024 11:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AD=A3=E6=96=B9=E5=BD=A2?= =?UTF-8?q?=E8=A3=81=E5=89=AA=E6=9C=89=E4=BA=9B=E5=9B=BE=E7=89=87=E8=A3=81?= =?UTF-8?q?=E5=89=AA=E5=88=9B=E5=BB=BApixelMap=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zenggaofeng --- CHANGELOG.md | 1 + .../imageknife/transform/CropSquareTransformation.ets | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6007ae1..e41c14f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 2.1.2-rc.6 - 修复手机调节显示大小时图片消失 - pngWorker线程改为taskpool +- 修复正方形裁剪有些图片裁剪创建pixelMap失败 ## 2.1.2-rc.5 - moduleContext新增缓存策略,缓存上限5,缓存策略Lru diff --git a/library/src/main/ets/components/imageknife/transform/CropSquareTransformation.ets b/library/src/main/ets/components/imageknife/transform/CropSquareTransformation.ets index ca84913..2d8009f 100644 --- a/library/src/main/ets/components/imageknife/transform/CropSquareTransformation.ets +++ b/library/src/main/ets/components/imageknife/transform/CropSquareTransformation.ets @@ -60,8 +60,8 @@ export class CropSquareTransformation implements BaseTransform { editable: true, rotate: 0, desiredSize: { - width: outWidth, - height: outHeight + width: pw, + height: ph }, desiredRegion: { size: { width: targetSize, height: targetSize }, x: pw / 2 - targetSize / 2,