It works in creating the animated WebP, but each Frame seems to include all previous Frames.
Can you tell me if I did something wrong, here is a snippet:
drawable = ApngDrawable.decode(getInputStream(uri))
val encoder = WebPEncoder()
for (frameNum in 0 until drawable.frameCount) {
drawable.seekToFrame(0, frameNum)
var frame = scaleToAlternative(drawableToBitmap(drawable.current)!!, 512, 512, 16)
encoder.addFrame(frame, 0, 0, drawable.frameDurations[frameNum])
}
createFile(encoder.build(), path)
It works in creating the animated WebP, but each Frame seems to include all previous Frames. Can you tell me if I did something wrong, here is a snippet:
I try to create an animated WebP from an APNG.