fix: 修复保存 gif 图片扩展名为 jpg

This commit is contained in:
HuanCheng65 2023-05-05 22:56:01 +08:00
parent 8f6663c83c
commit c347420dee
No known key found for this signature in database
GPG Key ID: 5EC9DD60A32C7360
1 changed files with 0 additions and 2 deletions

View File

@ -94,9 +94,7 @@ object ImageUtil {
if (inputStream == null) return false
val bytes = ByteArray(4)
try {
inputStream.mark(0)
inputStream.read(bytes)
inputStream.reset()
val str = String(bytes)
return str.equals("GIF8", ignoreCase = true)
} catch (e: IOException) {