修改webp图片区分动静图和错误图加载完未发起排队队列中的请求
Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
parent
ad18fe60b2
commit
fae5b3c7fd
|
@ -1,3 +1,7 @@
|
||||||
|
## 3.1.0-rc.3
|
||||||
|
- 部分静态webp图片有delay属性导致识别成动图,改用getFrameCount识别
|
||||||
|
- 修复加载错误图后未去请求排队队列中的请求
|
||||||
|
|
||||||
## 3.1.0-rc.2
|
## 3.1.0-rc.2
|
||||||
- 修复宽高不等svg图片显示有毛边
|
- 修复宽高不等svg图片显示有毛边
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { ImageKnifeComponent,ImageKnifeOption } from '@ohos/libraryimageknife';
|
import { BlurTransformation, ImageKnifeComponent,ImageKnifeOption } from '@ohos/libraryimageknife';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ struct ManyPhotoShowPage {
|
||||||
placeholderSrc:$r("app.media.loading"),
|
placeholderSrc:$r("app.media.loading"),
|
||||||
errorholderSrc:$r("app.media.failed"),
|
errorholderSrc:$r("app.media.failed"),
|
||||||
objectFit: ImageFit.Auto,
|
objectFit: ImageFit.Auto,
|
||||||
border: {radius:50}
|
border: {radius:50},
|
||||||
|
transformation:new BlurTransformation(5)
|
||||||
})})
|
})})
|
||||||
}
|
}
|
||||||
.width(56).height(56)
|
.width(56).height(56)
|
||||||
|
|
|
@ -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.1.0-rc.2",
|
"version": "3.1.0-rc.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ohos/gpu_transform": "^1.0.2"
|
"@ohos/gpu_transform": "^1.0.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -263,6 +263,7 @@ export class ImageKnifeDispatcher {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.executingJobMap.remove(memoryKey);
|
this.executingJobMap.remove(memoryKey);
|
||||||
|
this.dispatchNextJob();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 保存文件缓存
|
// 保存文件缓存
|
||||||
|
@ -608,8 +609,8 @@ async function requestJob(request: RequestJobRequest, requestList?: List<ImageKn
|
||||||
}
|
}
|
||||||
let resPixelmap: PixelMap | undefined = undefined
|
let resPixelmap: PixelMap | undefined = undefined
|
||||||
if (typeValue === 'gif' || typeValue === 'webp') {
|
if (typeValue === 'gif' || typeValue === 'webp') {
|
||||||
let delayList = await imageSource.getDelayTimeList()
|
let frameCount = await imageSource.getFrameCount()
|
||||||
if(delayList == undefined) {
|
if(frameCount == undefined || frameCount == 1) {
|
||||||
} else {
|
} else {
|
||||||
let size = (await imageSource.getImageInfo()).size
|
let size = (await imageSource.getImageInfo()).size
|
||||||
let base64Help = new util.Base64Helper()
|
let base64Help = new util.Base64Helper()
|
||||||
|
|
Loading…
Reference in New Issue