Compare commits

..

No commits in common. "32da743bcc37be137aae64e728115bcf21bed7b2" and "f552f577134ae219cb069632818f3e460a75b6b0" have entirely different histories.

2 changed files with 4 additions and 21 deletions

View File

@ -1,7 +1,5 @@
## 3.2.0 ## 3.2.0
- Fix bug: PixelMap size exceeds the maximum value of memory cache and is not cached - PixelMap size exceeds the maximum value of memory cache and is not cached
- Dealing with exception scenarios where imageSource.getImageInfo return undefined
## 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

View File

@ -123,12 +123,7 @@ export class ImageKnifeLoader {
return return
} }
let imageInfoSync = imageSource.getImageInfoSync() let size = (await imageSource.getImageInfo()).size
if (imageInfoSync == undefined){
ImageKnifeLoader.makeEmptyResult(request, "Fail to get image info of imageSource")
return
}
let size = imageInfoSync.size
callBackData.imageWidth = size.width; callBackData.imageWidth = size.width;
callBackData.imageHeight = size.height; callBackData.imageHeight = size.height;
try { try {
@ -199,12 +194,7 @@ export class ImageKnifeLoader {
return return
} }
let imageInfoSync = imageSource.getImageInfoSync() let size = (await imageSource.getImageInfo()).size
if (imageInfoSync == undefined){
ImageKnifeLoader.makeEmptyResult(request, "Fail to get image info of imageSource")
return
}
let size = imageInfoSync.size
let scale = size.height / size.width let scale = size.height / size.width
let hValue = Math.round(request.componentHeight); let hValue = Math.round(request.componentHeight);
let wValue = Math.round(request.componentWidth); let wValue = Math.round(request.componentWidth);
@ -275,12 +265,7 @@ export class ImageKnifeLoader {
} }
let frameCount = await imageSource.getFrameCount() let frameCount = await imageSource.getFrameCount()
let imageInfoSync = imageSource.getImageInfoSync() let size = (await imageSource.getImageInfo()).size
if (imageInfoSync == undefined){
ImageKnifeLoader.makeEmptyResult(request, "Fail to get image info of imageSource")
return
}
let size = imageInfoSync.size
callBackData.frameCount = frameCount; callBackData.frameCount = frameCount;
callBackData.imageWidth = size.width; callBackData.imageWidth = size.width;
callBackData.imageHeight = size.height; callBackData.imageHeight = size.height;