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