fix buggy isApng()
This commit is contained in:
parent
d554f4d828
commit
3896d45b19
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue