Compare commits

..

No commits in common. "04e2d430f2d242b2073bc03013951e8bec1f443e" and "1153390393a7ebb7937c39cd1db08ce87e1dfbf4" have entirely different histories.

7 changed files with 4 additions and 18 deletions

View File

@ -1,9 +1,6 @@
## 3.2.0-rc.2
## 3.2.0-rc.1
- Added callback information for image loading
- Added the interface for obtaining the upper limit and size of the current cache and the number of images corresponding to the current cache
- HTTPS custom certificate verification
## 3.2.0-rc.1
- Change the queue from Stack to Queue
- ShowPixelMap callback PixelMap assigns value to Image component to synchronize

View File

@ -76,9 +76,7 @@ struct SingleImage {
placeholderSrc: $r("app.media.loading"),
errorholderSrc: $r("app.media.failed"),
objectFit: ImageFit.Contain,
progressListener:(progress:number)=>{console.info("ImageKnife:: call back progress = " + progress)},
// 通过https协议进行连接时默认使用系统预设CA证书。若希望使用自定义证书进行https连接则需要将自定义证书上传至应用沙箱目录中并在caPath中指定该证书所在的应用沙箱路径
// caPath: "/data/storage/el1/bundle/ca.pem",
progressListener:(progress:number)=>{console.info("ImageKnife:: call back progress = " + progress)}
}
}).width(100).height(100)
Text($r('app.string.Custom_network_download'))

View File

@ -14,7 +14,7 @@
"main": "index.ets",
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
"type": "module",
"version": "3.2.0-rc.2",
"version": "3.2.0-rc.1",
"dependencies": {
"@ohos/gpu_transform": "^1.0.2"
},

View File

@ -254,8 +254,7 @@ export class ImageKnifeDispatcher {
fileCacheFolder: ImageKnife.getInstance().getFileCache()?.getCacheFolder(),
isAnimator:isAnimator,
moduleName: moduleName == "" ? undefined : moduleName,
resName: resName == "" ? undefined : resName,
caPath: currentRequest.imageKnifeOption.caPath,
resName: resName == "" ? undefined : resName
}
if(request.customGetImage == undefined) {

View File

@ -454,7 +454,6 @@ export class ImageKnifeLoader {
readTimeout: 0,
// usingProtocol:http.HttpProtocol.HTTP1_1
// header: new Header('application/json')
caPath: request.caPath === undefined ? undefined : request.caPath,
});
promise.then((data: number) => {

View File

@ -146,6 +146,5 @@ export interface RequestJobRequest {
isAnimator?: boolean,
moduleName?:string,
resName?: string
caPath?: string,
}

View File

@ -44,10 +44,6 @@ export class AnimatorOption {
onRepeat?:()=>void
}
interface ImageOption {
// 自定义证书路径
caPath?: string,
}
@Observed
export class ImageKnifeOption {
// 主图资源
@ -78,8 +74,6 @@ export class ImageKnifeOption {
onLoadListener?: OnLoadCallBack | undefined;
onComplete?:(event:EventImage | undefined) => void
drawingColorFilter?: ColorFilter | drawing.ColorFilter
// 自定义证书路径
caPath?: string
constructor() {
}