Bunch of docs I had to read to understand the spec:
https://www.fileformat.info/format/gif/spec/index.htm
https://www.w3.org/Graphics/GIF/spec-gif87.txt
https://en.wikipedia.org/wiki/GIF#Image_decoding
http://fileformats.archiveteam.org/wiki/GIF
http://www.matthewflickinger.com/lab/whatsinagif/lzw_image_data.asp
https://www.eecis.udel.edu/~amer/CISC651/lzw.and.gif.explained.html
About aspect ratio: https://exiftool.org/forum/index.php?topic=11588.0
About decompression: https://stackoverflow.com/questions/14203731/parsing-gif-raster-data-lzw
Transparent pixels: https://engineering.giphy.com/modifying-ffmpeg-to-support-transparent-gifs/
Disposal: http://www.theimage.com/animation/pages/disposal2.html or https://docstore.mik.ua/orelly/web2/wdesign/ch23_05.htm
About transparency: https://ezgif.com/help/gif-transparency
A clear explanation of the lzw decoding loop: https://www.daubnet.com/en/file-format-gif
Gradle kts config for rust: https://github.com/shadowsocks/shadowsocks-android/blob/master/core/build.gradle.kts