I want to find the number of frames in a GIF then fetch the last one. For reference, my test file is:
Code:
https://media.newyorker.com/cartoons/5a3d99a75e8c9840cf254750/master/+w_1626,c_limit/DC122717.gif
I used imagemagick; it took 15 minutes to count the number of frames; it took 16 minutes to extract the last one. In both cases it used most of the disk's access: it has to inspect every single frame, creating an 8 MB temporary file for each. The test file has 149 frames.
Someone asked at
https://sourceforge.net/p/giflib/mai...sage/35255030/ last year, never got a response.
I just read the spec: I don't see a frame count in the header. GIF wasn't invented to handle animation, as earlier docs note.
I extracted the first frame, then divided the file size by its size, but frames are of such varying size that didn't work.