【发布时间】:2021-03-03 22:09:38
【问题描述】:
我有一个 webP 格式的图像文件。如何以编程方式检查它是动画 webP 还是静态图像?
【问题讨论】:
标签: android imageview fresco image-rendering animated-webp
我有一个 webP 格式的图像文件。如何以编程方式检查它是动画 webP 还是静态图像?
【问题讨论】:
标签: android imageview fresco image-rendering animated-webp
由于您在问题中添加了 fresco 标签,您可以使用以下实用程序:
ImageFormatChecker.getImageFormat_WrapIOException(encodedImage.getInputStream()) 应该返回 ImageFormat.WEBP_ANIMATED
【讨论】: