0

I have an image file of webP format. How can I check if it is animated webP or a static image programmatically?

Ganesh S S
  • 571
  • 5
  • 10

1 Answers1

0

Since you added fresco tag to the question, you could use the following utility:

ImageFormatChecker.getImageFormat_WrapIOException(encodedImage.getInputStream()) should return ImageFormat.WEBP_ANIMATED

https://github.com/facebook/fresco/blob/master/imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java#L125

defhlt
  • 1,775
  • 2
  • 17
  • 24