Page 1 of 1

handling gif

Posted: 2010-01-05T22:53:24-07:00
by manit
i wanted to use http://upload.wikimedia.org/wikipedia/c ... ionGPS.gif
to get 24 frames from gif
I tried
montage -geometry +1+1 constellation.gif 1.jpg
Then I got a big file with hundreds of thumbnail but only one was clear while I think others denoted incremental change in original.
What I want to do is take out 24 complete clips from whole duration of gif.

Re: handling gif

Posted: 2010-01-06T11:10:37-07:00
by fmw42
use

convert constellation.gif -coalesce constellation_new.gif

to reconstitute the full frames from the partials. then select the frames you want for your montage or create a new gif will only the frames you want first.

see http://www.imagemagick.org/Usage/anim_basics/#coalesce

Thank you fmw42 and one more question

Posted: 2010-01-08T01:34:53-07:00
by manit
Coalesce created a 1.3MB gif animation with complete frames.
i also read how animations are created by overlaying images & if just small change is stored in each frame (like the GPS gif I pointed to) then effect is same with small file-size.
QUESTION
i also read somewhere that gif has 256 colour palette( so suited for cartoon animations using single colour not many shades) . Is it true ? Then I think must be 2 bits for red,green.blue & alpha apiece.

The gif created a 5.7M jpg with 300 frames.
Can I extract every 10th frame from gif directly ?
Also how to find out time interval of gif ? I tried
identify -verbose File > 1.txt
then got 129400 line file at end of which there was elapsed time:16.Any smaller way ?

Re: Thank you fmw42 and one more question

Posted: 2010-01-08T10:17:43-07:00
by fmw42
manit wrote: QUESTION
i also read somewhere that gif has 256 colour palette( so suited for cartoon animations using single colour not many shades) . Is it true ? Then I think must be 2 bits for red,green.blue & alpha apiece.

The gif created a 5.7M jpg with 300 frames.
Can I extract every 10th frame from gif directly ?
Also how to find out time interval of gif ? I tried
identify -verbose File > 1.txt
then got 129400 line file at end of which there was elapsed time:16.Any smaller way ?
Give uses a palette or list of colors, so not necessarily a given number of bits for each for R,G,B and it uses a 1 bit alpha channel (on or off)

see http://www.imagemagick.org/Usage/formats/#gif

For extracting frames you use the convention image.gif[#-#] for a continuous range of frames or image.gif[#] for a single frame. But I don't think IM has a skip convention. So you will need to write a script loop to select the frames you want and merge them into one image.

see http://www.imagemagick.org/Usage/basics/#sequence