commit
ad18fe60b2
|
@ -1,3 +1,6 @@
|
|||
## 3.1.0-rc.2
|
||||
- 修复宽高不等svg图片显示有毛边
|
||||
|
||||
## 3.1.0-rc.1
|
||||
- ImageKnifeAnimatorComponent新增开始、结束、暂停的回调事件
|
||||
- 文件缓存数量负数和超过INT最大值时默认为INT最大值
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"main": "index.ets",
|
||||
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
|
||||
"type": "module",
|
||||
"version": "3.1.0-rc.1",
|
||||
"version": "3.1.0-rc.2",
|
||||
"dependencies": {
|
||||
"@ohos/gpu_transform": "^1.0.2"
|
||||
},
|
||||
|
|
|
@ -626,10 +626,12 @@ async function requestJob(request: RequestJobRequest, requestList?: List<ImageKn
|
|||
};
|
||||
}
|
||||
} else if(typeValue == "svg") {
|
||||
let size = (await imageSource.getImageInfo()).size
|
||||
let scale = size.height / size.width
|
||||
let hValue = Math.round(request.componentHeight);
|
||||
let wValue = Math.round(request.componentWidth);
|
||||
let defaultSize: image.Size = {
|
||||
height: vp2px(hValue),
|
||||
height: vp2px(wValue) * scale,
|
||||
width: vp2px(wValue)
|
||||
};
|
||||
let opts: image.DecodingOptions = {
|
||||
|
|
Loading…
Reference in New Issue