fix buggy isApng()

This commit is contained in:
oupson 2018-11-15 21:17:14 +01:00
parent d554f4d828
commit 3896d45b19
1 changed files with 12 additions and 8 deletions

View File

@ -18,6 +18,7 @@ class Utils {
* @return True if is an APNG
*/
fun isApng(byteArray: ByteArray) : Boolean {
try {
val acTL = byteArrayOf(0x66, 0x63, 0x54, 0x4c)
loop@ for (i in 0 until byteArray.size) {
val it = byteArray.copyOfRange(i, i + 4)
@ -27,6 +28,9 @@ class Utils {
}
}
return false
} catch (e : Exception) {
return false
}
}
/**