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