A theoritical max gif is 65535x65535, meaning 4_294_836_225 pixels. The code creates an array to store these pixels. But in java, the max size of an array is around Integer.MAX_VALUE (apparently depends on the VM, can be minus 2 or minus 8), so around 2_147_483_648.
It means that the library is actually unable to decode gifs that size 🤔, and will throw an exception.
A theoritical max gif is 65535x65535, meaning 4_294_836_225 pixels. The code creates an array to store these pixels. But in java, the max size of an array is around Integer.MAX_VALUE (apparently depends on the VM, can be minus 2 or minus 8), so around 2_147_483_648. It means that the library is actually unable to decode gifs that size 🤔, and will throw an exception.