forked from floraachy/ImageKnife
修改file格式图片同步close和PixelMap默认不可编辑
Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
parent
f9e83786a8
commit
2cbce5790b
|
@ -1,9 +1,11 @@
|
||||||
## 3.1.0-rc.3
|
## 3.1.0
|
||||||
- 部分静态webp图片有delay属性导致识别成动图,改用getFrameCount识别
|
- 部分静态webp图片有delay属性导致识别成动图,改用getFrameCount识别
|
||||||
- 修复加载错误图后未去请求排队队列中的请求
|
- 修复加载错误图后未去请求排队队列中的请求
|
||||||
- 子线程本地Resource参数类型转换成number
|
- 子线程本地Resource参数类型转换成number
|
||||||
- 修改使用hilog记录日志,默认打开debug级别的日志
|
- 修改使用hilog记录日志,默认打开debug级别的日志
|
||||||
- 增加降采样
|
- 增加降采样
|
||||||
|
- file格式图片,fd同步close
|
||||||
|
- 解码pixelMap默认不可编辑,图形变化可编辑
|
||||||
|
|
||||||
## 3.1.0-rc.2
|
## 3.1.0-rc.2
|
||||||
- 修复宽高不等svg图片显示有毛边
|
- 修复宽高不等svg图片显示有毛边
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"main": "index.ets",
|
"main": "index.ets",
|
||||||
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
|
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "3.1.0-rc.3",
|
"version": "3.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ohos/gpu_transform": "^1.0.2"
|
"@ohos/gpu_transform": "^1.0.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -515,7 +515,7 @@ async function requestJob(request: RequestJobRequest, requestList?: List<ImageKn
|
||||||
let buf = new ArrayBuffer(stat.size);
|
let buf = new ArrayBuffer(stat.size);
|
||||||
await fs.read(file.fd, buf).then((readLen) => {
|
await fs.read(file.fd, buf).then((readLen) => {
|
||||||
resBuf = buf;
|
resBuf = buf;
|
||||||
fs.close(file.fd);
|
fs.closeSync(file.fd);
|
||||||
}).catch((err:BusinessError) => {
|
}).catch((err:BusinessError) => {
|
||||||
loadError = 'LoadDataShareFileClient fs.read err happened uri=' + request.src + " err.msg=" + err?.message + " err.code=" + err?.code;
|
loadError = 'LoadDataShareFileClient fs.read err happened uri=' + request.src + " err.msg=" + err?.message + " err.code=" + err?.code;
|
||||||
})
|
})
|
||||||
|
@ -585,7 +585,7 @@ async function requestJob(request: RequestJobRequest, requestList?: List<ImageKn
|
||||||
}
|
}
|
||||||
let imageSource: image.ImageSource = image.createImageSource(resBuf);
|
let imageSource: image.ImageSource = image.createImageSource(resBuf);
|
||||||
let decodingOptions: image.DecodingOptions = {
|
let decodingOptions: image.DecodingOptions = {
|
||||||
editable: true,
|
editable: request.requestSource === ImageKnifeRequestSource.SRC && request.transformation !== undefined ? true : false,
|
||||||
}
|
}
|
||||||
if(request.isAnimator) {
|
if(request.isAnimator) {
|
||||||
if (typeValue === 'gif' || typeValue === 'webp') {
|
if (typeValue === 'gif' || typeValue === 'webp') {
|
||||||
|
|
Loading…
Reference in New Issue