Open mctrivia opened 2 years ago
ran some tests. GifUtil.quantizeDekker uses about 20MB of ram for each 350x350px frame in my gif. So at frame 166 it goes over 4GB of ram. So its currently using 163 bytes per pixel. Only way to fix would be to make more efficient.
I am using the following function to try and create a thumbnail of a gif with a mask. icon.data is a buffer containing the gif data. The addMask function works with JIMP variables and works. even if I comment out the line that manipulates the frame it uses up all the ram and crashes with a FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
After some more checks I find that it is the GifUtil.quantizeDekker function causing the problem.