I'm having some problems with gifdecoder... when trying to load big gif files with this, I'm get the error:
java.lang.OutOfMemoryError: Failed to allocate a 1920012 byte allocation with 242424 free bytes and 236KB until OOM
B4X:
Dim EncGIF As AnimatedGifEncoder
Dim DecGIF As GifDecoder
File.Copy(sourcedir,sourcefile,File.DirInternal,"temp.gif")
Log("gif size -> " & File.Size(File.DirInternal,"temp.gif"))
DecGIF.Load(File.DirInternal,"temp.gif")'<< original gif path
It looks that is occurring because the library tries to load all the frames in the memory. If I had the source code could try to load the frame only when required, reducing a lot the memory use...
I guess that the problem is that the library loads each frame without scaling it (as done in LoadBitmapSample or LoadBitmapResize). This means that a single frame can consume all available memory.
You can try to set the largeHeap in the manifest editor. It will help a bit.