Introduce gif rewriter stub
This commit is contained in:
1 parent
726f482c33
commit
6dea7faac8
3 files changed
+20
-1
No files matched your search
@@ -80,6 +80,7 @@ class Image private constructor(source: Source, private var releaseCall: (() ->
|
||||
fun decode(src: ByteBufferSource): Image? {
|
||||
val directBuffer = src.getByteBuffer()
|
||||
check(directBuffer.isDirect)
|
||||
rewriteGifSource(directBuffer)
|
||||
return runCatching {
|
||||
Image(ImageDecoder.createSource(directBuffer)) {
|
||||
src.close()
|
||||
@@ -89,6 +90,9 @@ class Image private constructor(source: Source, private var releaseCall: (() ->
|
||||
it.printStackTrace()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
private external fun rewriteGifSource(buffer: ByteBuffer)
|
||||
}
|
||||
|
||||
interface ByteBufferSource : AutoCloseable {
|
||||
|
||||
Reference in new issue
Block a user