Page 1 of 1

animated GIF total size given on each frame

Posted: 2008-07-31T20:46:43-07:00
by naoliv
Hi!

As a wishlist for the identify program (from http://bugs.debian.org/493103):

Code: Select all

$ identify f.gif
f.gif[0] GIF 180x240 180x240+0+0 PseudoClass 256c 8-bit 59.2402kb
f.gif[1] GIF 37x21 180x240+77+61 PseudoClass 256c 8-bit 59.2402kb
f.gif[2] GIF 97x41 180x240+74+58 PseudoClass 256c 8-bit 59.2402kb...
This makes it look like each frame is 59.2402kb big, when in fact it
is a total... perhaps give the actual size, and a grand total at the end.
Thank you!

Best regards,
Nelson

Re: animated GIF total size given on each frame

Posted: 2008-07-31T23:05:06-07:00
by fmw42
Good idea!

Re: animated GIF total size given on each frame

Posted: 2008-08-14T19:04:15-07:00
by anthony
Yes it is a good idea. but it may not be practical, as IM can't calculate a partial filesize!!! Especially of a multi-image file format like GIF, where parts of later 'frames' could share a common 'global colormap'. It just does not make sense.

Of course other multi-image formats, like MIFF 9which is just a concatenation of uncompressed single images, it would be reasonably simple to do, but will need to be done by the coder.

You can tell it is from the same file in "identify" as the filename at the start of the line is the same.

Yes it is a good idea. but not one that can can be implemented easily.

Re: animated GIF total size given on each frame

Posted: 2008-08-14T19:55:55-07:00
by fmw42
why not then internally convert the image to MIFF and then compute the file size of each frame and return that with the result of the identify? it could be a special option (like -verbose) with identify so that one knows it is going to be extra processing.

Re: animated GIF total size given on each frame

Posted: 2008-08-14T20:55:08-07:00
by anthony
That is do-able, A rough calculation of just the uncompressed binary data size may also be possible, but it will not be a file size for a specific file format, with specific compression.