JarvyJ / rayimg

rayimg is a commandline Raspberry Pi image viewer
GNU Affero General Public License v3.0
1 stars 0 forks source link

More efficient gif loading #3

Open JarvyJ opened 1 month ago

JarvyJ commented 1 month ago

I currently want to target the old RPI 0 (and W) variants, but large animated gifs (30+ MB) sometimes fail to load. Honestly not sure if it's worth pursuing or just having some sort of file size limit in place.

Currently the gif loading works by loading the gif image data, and then the first time a frame is displayed compute what the new gif frame is. This keeps loading gifs somewhat fast.

Also, the current gif code uses too much memory. Not noticeable during development, but when you only have 1GB of RAM, it becomes very noticeable. Some thoughts:

JarvyJ commented 1 week ago

There's also trying out wuffs, which has a fast gif parser. I'm a little curious if it can do low-memory frame-by-frame parsing.