Fixed a bug where png files were not read correctly
This commit is contained in:
parent
ce6293e88f
commit
a37ca949b6
|
@ -406,10 +406,10 @@ class ApngDecoder {
|
||||||
body.addAll(Utils.IDAT.asList())
|
body.addAll(Utils.IDAT.asList())
|
||||||
// Get image bytes
|
// Get image bytes
|
||||||
body.addAll(
|
body.addAll(
|
||||||
byteArray.slice(
|
byteArray.copyOfRange(
|
||||||
i + 4..
|
i + 4,
|
||||||
i + 4 + bodySize
|
i + 4 + bodySize
|
||||||
)
|
).asList()
|
||||||
)
|
)
|
||||||
val crC32 = CRC32()
|
val crC32 = CRC32()
|
||||||
crC32.update(body.toByteArray(), 0, body.size)
|
crC32.update(body.toByteArray(), 0, body.size)
|
||||||
|
|
|
@ -375,7 +375,7 @@ class CreatorActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runCatching {
|
runCatching { // TODO
|
||||||
encoder.writeEnd()
|
encoder.writeEnd()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue