forked from floraachy/ImageKnife
1.delete useless JpegProgressTestCasePage
Signed-off-by: zhoulisheng <635547767@qq.com>
This commit is contained in:
parent
8e96a8da20
commit
d782685963
|
@ -129,8 +129,7 @@
|
|||
"pages/testMultiThreadWorkerPage2",
|
||||
"pages/testGlideOptionChangedPage",
|
||||
"pages/CropImagePage",
|
||||
"pages/networkTestCasePage",
|
||||
"pages/jpegProgressTestCasePage"
|
||||
"pages/networkTestCasePage"
|
||||
],
|
||||
"name": ".MainAbility",
|
||||
"window": {
|
||||
|
|
|
@ -87,11 +87,7 @@ struct Index {
|
|||
console.log("测试二级内存缓存")
|
||||
router.push({ uri: "pages/storageTestDiskLruCache" });
|
||||
}).margin({ top: 5, left: 3 })
|
||||
Button("测试JPEG")
|
||||
.onClick(() => {
|
||||
console.log("测试JPEG")
|
||||
router.push({ uri: "pages/JpegProgressTestCasePage" });
|
||||
}).margin({ top: 5, left: 3 })
|
||||
|
||||
}.width('100%')
|
||||
.height(60).backgroundColor(Color.Pink)
|
||||
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {GlideImage} from "../glide/GlideImage"
|
||||
import {GlideOption} from "../glide/GlideOption"
|
||||
import {FileUtils} from "../cache/FileUtils"
|
||||
import {RotateImageTransformation} from "../glide/transform/RotateImageTransformation"
|
||||
import {RoundedCornersTransformation} from "../glide/transform/RoundedCornersTransformation"
|
||||
import resourceManager from '@ohos.resourceManager';
|
||||
import image from "@ohos.multimedia.image"
|
||||
@Entry
|
||||
@Component
|
||||
struct JpegProgressTestCasePage {
|
||||
|
||||
|
||||
build() {
|
||||
Scroll() {
|
||||
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
|
||||
Button('点击调用渐进式解码')
|
||||
.onClick(()=> {
|
||||
resourceManager.getResourceManager()
|
||||
.then(result => {
|
||||
result.getMedia($r('app.media.jpgSample').id)
|
||||
.then(data => {
|
||||
let arrayBuffer = FileUtils.getInstance().uint8ArrayToBuffer(data);
|
||||
let imageSourceIncrementalSApi = image.createIncrementalSource(data);
|
||||
let array = [1,2,3,4,5,6,7,8,9,10];
|
||||
imageSourceIncrementalSApi.updateData(array, false,(error,data) => {
|
||||
console.log("data is null="+(data == null || data == undefined))
|
||||
console.log("array = "+array)
|
||||
console.log("data ="+data)
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
Button('点击调用渐进式解码带上length')
|
||||
.onClick(()=> {
|
||||
resourceManager.getResourceManager()
|
||||
.then(result => {
|
||||
result.getMedia($r('app.media.jpgSample').id)
|
||||
.then(data => {
|
||||
let arrayBuffer = FileUtils.getInstance().uint8ArrayToBuffer(data);
|
||||
let imageSourceIncrementalSApi = image.createIncrementalSource(data);
|
||||
let array = [1,2,3,4,5,6,7,8,9,10];
|
||||
imageSourceIncrementalSApi.updateData(array, false, 0, 10,(error,data) => {
|
||||
console.log("data is null="+(data == null || data == undefined))
|
||||
console.log("array = "+array)
|
||||
console.log("data ="+data)
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue