Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

How to support for still / animated WebP image format #47

Open
david-kollectin opened this issue Jun 3, 2020 · 1 comment
Open

How to support for still / animated WebP image format #47

david-kollectin opened this issue Jun 3, 2020 · 1 comment

Comments

@david-kollectin
Copy link

I would like to use Nuke to deal with web image loading and image cache.
And I also have need for loading animated WebP image so I import NukeWebPPlugin.
I wrote some code with Nuke for testing:

WebPImageDecoder.enable()
let urlStr = "https://isparta.github.io/compare-webp/image/gif_webp/webp/2.webp"
if let onlineFileUrl = URL(string: urlStr) {
let task = ImagePipeline.shared.loadImage(with: onlineFileUrl, queue: nil, progress: nil) { (result: Result<ImageResponse, ImagePipeline.Error>) in
switch result {
case .success(let imageRespoonse):
//...deal with image
break
case .failure(let error):
debugPrint("error: (error.localizedDescription)")
//...error handling
break
}
}

And I got an error:
"decoding failed : Failed to create an image from the image data"
I would ask How to support for still / animated WebP image format?
Thank you.

@aniltaskiran
Copy link

is there any progress on this issue? @ryokosuge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants