修改CHANGELOG版本号
Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
parent
3dd622e4e2
commit
f552f57713
|
@ -1,3 +1,5 @@
|
|||
## 3.2.0
|
||||
- PixelMap size exceeds the maximum value of memory cache and is not cached
|
||||
## 3.2.0-rc.2
|
||||
- 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
|
||||
|
|
|
@ -267,7 +267,7 @@ ImageKnifeAnimatorComponent({
|
|||
|
||||
#### 11.加载图片回调信息数据 示例
|
||||
```
|
||||
ImageKnifeComponent({ ImageKnifeOption: = new ImageKnifeOption({
|
||||
ImageKnifeComponent({ ImageKnifeOption: = {
|
||||
loadSrc: $r('app.media.pngSample'),
|
||||
objectFit: ImageFit.Contain,
|
||||
onLoadListener: {
|
||||
|
@ -290,7 +290,7 @@ ImageKnifeComponent({ ImageKnifeOption: = new ImageKnifeOption({
|
|||
let render_success = JSON.stringify(Date.now())
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}).width(100).height(100)
|
||||
```
|
||||
#### 12.图片降采样 示例
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||
import { ImageKnifeOption, ImageKnifeRequest } from '@ohos/imageknife/Index';
|
||||
import { ImageKnifeOption, ImageKnifeRequest } from '@ohos/imageknife';
|
||||
import { DefaultJobQueue } from '@ohos/imageknife/src/main/ets/queue/DefaultJobQueue';
|
||||
import { IJobQueue } from '@ohos/imageknife/src/main/ets/queue/IJobQueue';
|
||||
import taskpool from '@ohos.taskpool';
|
||||
|
@ -70,10 +70,10 @@ export default function DefaultJobQueueTest() {
|
|||
}
|
||||
|
||||
function makeRequest(src: string, context: common.UIAbilityContext, priority?: taskpool.Priority): ImageKnifeRequest {
|
||||
let option: ImageKnifeOption = new ImageKnifeOption({
|
||||
let option: ImageKnifeOption = {
|
||||
loadSrc: src,
|
||||
priority: priority
|
||||
})
|
||||
}
|
||||
return new ImageKnifeRequest(
|
||||
option,
|
||||
context,
|
||||
|
|
|
@ -153,9 +153,9 @@ export default function FileLruCacheTest() {
|
|||
});
|
||||
it('fileCacheEngineKey', 0, () => {
|
||||
let engineKey: IEngineKey = new DefaultEngineKey()
|
||||
let imageKnifeOption: ImageKnifeOption = new ImageKnifeOption({
|
||||
let imageKnifeOption: ImageKnifeOption = {
|
||||
loadSrc:"abc"
|
||||
})
|
||||
}
|
||||
let imageKey = engineKey.generateFileKey(imageKnifeOption.loadSrc,"")
|
||||
let imageAnimatorKey = engineKey.generateFileKey(imageKnifeOption.loadSrc,"",true)
|
||||
expect(imageKey == imageAnimatorKey).assertFalse()
|
||||
|
|
|
@ -40,10 +40,10 @@ export default function ImageKnifeTest() {
|
|||
|
||||
it('removeMemoryCache', 0, async () => {
|
||||
let a = 'https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp';
|
||||
let option: ImageKnifeOption = new ImageKnifeOption({
|
||||
let option: ImageKnifeOption = {
|
||||
loadSrc: 'https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp',
|
||||
signature: ''
|
||||
})
|
||||
}
|
||||
let key = ImageKnife.getInstance()
|
||||
.getEngineKeyImpl()
|
||||
.generateMemoryKey('https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp', ImageKnifeRequestSource.SRC, option)
|
||||
|
|
|
@ -44,7 +44,7 @@ export default function ImageKnifeOptionTest() {
|
|||
imageWidth: 0,
|
||||
imageHeight: 0,
|
||||
}
|
||||
let imageKnifeOption: ImageKnifeOption = new ImageKnifeOption({
|
||||
let imageKnifeOption: ImageKnifeOption = {
|
||||
loadSrc: $r("app.media.rabbit"),
|
||||
onLoadListener: {
|
||||
onLoadFailed: (err) => {
|
||||
|
@ -58,7 +58,7 @@ export default function ImageKnifeOptionTest() {
|
|||
return data;
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
if (imageKnifeOption.onLoadListener && imageKnifeOption.onLoadListener.onLoadSuccess && imageKnifeOption.onLoadListener.onLoadFailed) {
|
||||
imageKnifeOption.onLoadListener.onLoadSuccess(a,imageData);
|
||||
imageKnifeOption.onLoadListener.onLoadFailed(a);
|
||||
|
|
|
@ -122,9 +122,9 @@ export default function MemoryLruCacheTest() {
|
|||
|
||||
it('memoryCacheEngineKey', 0, () => {
|
||||
let engineKey: IEngineKey = new DefaultEngineKey()
|
||||
let imageKnifeOption: ImageKnifeOption = new ImageKnifeOption({
|
||||
let imageKnifeOption: ImageKnifeOption = {
|
||||
loadSrc:"abc"
|
||||
})
|
||||
}
|
||||
let imageKey = engineKey.generateMemoryKey(imageKnifeOption.loadSrc,ImageKnifeRequestSource.SRC,imageKnifeOption)
|
||||
let imageAnimatorKey = engineKey.generateMemoryKey(imageKnifeOption.loadSrc,ImageKnifeRequestSource.SRC,imageKnifeOption,true)
|
||||
expect(imageKey == imageAnimatorKey).assertFalse()
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
|
||||
import { image } from '@kit.ImageKit'
|
||||
import { BusinessError } from '@kit.BasicServicesKit'
|
||||
import { Downsampler } from '@ohos/imageknife/src/main/ets/downsampling/Downsampler'
|
||||
import { DownsampleStrategy } from '@ohos/imageknife'
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import {
|
|||
ImageKnifeOption,
|
||||
ImageKnife,
|
||||
ImageKnifeRequest,
|
||||
ImageKnifeRequestSource,
|
||||
CacheStrategy
|
||||
} from "@ohos/imageknife"
|
||||
import { common } from '@kit.AbilityKit';
|
||||
|
|
|
@ -17,8 +17,7 @@ import {
|
|||
ImageKnifeOption,
|
||||
ImageKnife,
|
||||
ImageKnifeRequest,
|
||||
ImageKnifeRequestSource,
|
||||
CacheStrategy
|
||||
ImageKnifeData
|
||||
} from "@ohos/imageknife"
|
||||
import { common } from '@kit.AbilityKit';
|
||||
|
||||
|
@ -44,8 +43,8 @@ export default function loadCallBackData() {
|
|||
// This API supports only one parameter: clear action function.
|
||||
});
|
||||
it('startAndSuccess-CallBack', 0, async () => {
|
||||
let startCallBack: ESObject = undefined;
|
||||
let successCallBack: ESObject = undefined;
|
||||
let startCallBack: ImageKnifeData | undefined = undefined;
|
||||
let successCallBack: ImageKnifeData | undefined = undefined;
|
||||
let url: string =
|
||||
"https://contentcenter-drcn.dbankcdn.cn/pub_1/DevEcoSpace_1_900_9/63/v3/qbe6NZkCQyGcITvdWoZBgg/Y-5U1z3GT_yaK8CBD3jkwg.jpg"
|
||||
let imageKnifeOption: ImageKnifeOption = {
|
||||
|
@ -81,7 +80,7 @@ export default function loadCallBackData() {
|
|||
expect(successCallBack != undefined).assertTrue();
|
||||
});
|
||||
it('failed-CallBack', 0, async () => {
|
||||
let failedCallBack: ESObject = undefined;
|
||||
let failedCallBack: ImageKnifeData | undefined = undefined;
|
||||
let url: string =
|
||||
"https://contentcenter-drcn.dbankcdn.cn/pub_1/DevEcoSpace_1_900_9/163/v3/qbe6NZkCQyGcITvdWoZBgg/Y-5U1z3GT_yaK8CBD3jkwg.jpg"
|
||||
let imageKnifeOption: ImageKnifeOption = {
|
||||
|
|
|
@ -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",
|
||||
"dependencies": {
|
||||
"@ohos/gpu_transform": "^1.0.2"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue