How to split an animated GIF into separate GIFs on Linux usingfreeware

Discussion in 'Digital Photography' started by Danny D., Mar 3, 2013.

  1. Danny D.

    Danny D. Guest

    My kid is studying the history of China in school and I would like to
    split this Wikipedia animated GIF into its attendant 16 frames:
    http://en.wikipedia.org/wiki/File:Territories_of_Dynasties_in_China.gif

    Any ideas how I do that on Linux using freeware?

    I saved it as Territories_of_Dynasties_in_China.gif, but when I opened
    it in the default Eye of Gnome picture viwer, it was stuck on the first
    image. Pressing space bar did NOT move to subsequent images.

    Any ideas how to split an animated GIF into it's frames on Linux?
    Danny D., Mar 3, 2013
    #1
    1. Advertising

  2. Danny D.

    Mayayana Guest

    Re: How to split an animated GIF into separate GIFs on Linux using freeware

    Irfan View can do that on Windows. I don't know of
    a Linux alternative, but if you don't find one you
    like then you might want to install WINE and run Irfan
    View in that. It's a free program that's very well put
    together, is only a few MB in size, and has a remarkable
    amount of functionality as an image viewer and editor.

    (If I were to vote for the all-around best program in
    the history of Windows, it would be Irfan View. Not
    because it's better than any other program, but because
    for what it does the size, stability, functionality, etc.
    are all as good or better than any other program I can
    think of.)

    --
    --
    "Danny D." <> wrote in message
    news:kh0c90$pa9$...
    | My kid is studying the history of China in school and I would like to
    | split this Wikipedia animated GIF into its attendant 16 frames:
    | http://en.wikipedia.org/wiki/File:Territories_of_Dynasties_in_China.gif
    |
    | Any ideas how I do that on Linux using freeware?
    |
    | I saved it as Territories_of_Dynasties_in_China.gif, but when I opened
    | it in the default Eye of Gnome picture viwer, it was stuck on the first
    | image. Pressing space bar did NOT move to subsequent images.
    |
    | Any ideas how to split an animated GIF into it's frames on Linux?
    Mayayana, Mar 3, 2013
    #2
    1. Advertising

  3. Danny D.

    Me Guest

    On 4/03/2013 9:36 a.m., Danny D. wrote:
    > My kid is studying the history of China in school and I would like to
    > split this Wikipedia animated GIF into its attendant 16 frames:
    > http://en.wikipedia.org/wiki/File:Territories_of_Dynasties_in_China.gif
    >
    > Any ideas how I do that on Linux using freeware?
    >
    > I saved it as Territories_of_Dynasties_in_China.gif, but when I opened
    > it in the default Eye of Gnome picture viwer, it was stuck on the first
    > image. Pressing space bar did NOT move to subsequent images.
    >
    > Any ideas how to split an animated GIF into it's frames on Linux?
    >

    The Gimp (freeware) will open an animated GIF, with a separate "layer"
    for each frame.
    Use the "layers" dialog to scroll through, select and extract frames as
    required.
    Me, Mar 3, 2013
    #3
  4. Danny D.

    Zak Hipp Guest

    On 03/03/2013 22:36, Floyd L. Davidson wrote:
    > "Danny D." <> wrote:
    >> My kid is studying the history of China in school and I would like to
    >> split this Wikipedia animated GIF into its attendant 16 frames:
    >> http://en.wikipedia.org/wiki/File:Territories_of_Dynasties_in_China.gif
    >>
    >> Any ideas how I do that on Linux using freeware?
    >>
    >> I saved it as Territories_of_Dynasties_in_China.gif, but when I opened
    >> it in the default Eye of Gnome picture viwer, it was stuck on the first
    >> image. Pressing space bar did NOT move to subsequent images.
    >>
    >> Any ideas how to split an animated GIF into it's frames on Linux?

    >
    > Edit the image with GIMP. That will allow you to
    > enable/disable each layer independently. You can
    > disable viewing for all 16 layers, and then enable each
    > layer one at a time and save it to a separate file.
    >
    > /krita/ is another image program that will show and work
    > with all of the layers independently.


    Just thread info'.

    Krita v2.6:
    http://krita.org/

    Download:
    http://krita.org/download

    FAQ:
    http://krita.org/faq


    Zak Hipp
    Zak Hipp, Mar 3, 2013
    #4
  5. Re: How to split an animated GIF into separate GIFs on Linux using freeware

    On Sun, 3 Mar 2013 20:36:48 +0000 (UTC), Danny D. wrote:

    > My kid is studying the history of China in school and I would like to
    > split this Wikipedia animated GIF into its attendant 16 frames:
    > http://en.wikipedia.org/wiki/File:Territories_of_Dynasties_in_China.gif
    >
    > Any ideas how I do that on Linux using freeware?


    GraphicsMagick or Imagemagick with convert option (or the pre-compiled
    convert version), e.g.:

    gm convert Territories_of_Dynasties_in_China.gif Frames%02d.gif

    www.graphicsmagick.org
    www.imagemagick.org

    HTH
    BeAr
    --
    ===========================================================================
    = What do you mean with: "Perfection is always an illusion"? =
    ===============================================================--(Oops!)===
    B. R. 'BeAr' Ederson, Mar 4, 2013
    #5
  6. Danny D.

    Danny D. Guest

    On Sun, 03 Mar 2013 13:36:59 -0900 Floyd L. Davidson wrote:

    > Edit the image with GIMP. That will allow you to
    > enable/disable each layer independently. You can
    > disable viewing for all 16 layers, and then enable each
    > layer one at a time and save it to a separate file.


    Thank you for the advice!

    At first I couldn't find any menu item to disable viewing
    for all layers, or even for any layer- but then I realized
    that DELETING the layer worked - so this is what I did:

    I first obtained the animated GIF file of the history of China:
    http://en.wikipedia.org/wiki/File:Territories_of_Dynasties_in_China.gif

    I opened that 16-frame file in The GIMP on Linux:
    TheGIMP:File->Open->Territories_of_Dynasties_in_China.gif

    I noticed The Gimp started on frame 16, so I saved that frame first:
    TheGIMP:File->Save As->layer16.gif

    This brought up an "Export File" message saying:
    "Your image should be exported before it can be saved
    as GIF for the following reasons:
    GIF plug-in can only handle layers as animation frames
    (*)Merge Visible Layers
    ( )Save as Animation
    The export conversion won't modify your original image.
    [Ignore] [Cancel] [Export]

    I hit the "Export" button & hit "Save".
    This saved the 16th layer perfectly as "layer16.gif".

    I then deleted the 16th layer:
    TheGIMP:Layer->Delete layer

    The result was the 15th layer, which I saved:
    TheGIMP:File->Save As->layer15.gif->Export->Save

    I then deleted the 15th layer:
    TheGIMP:Layer->Delete layer

    And so on...

    The result was:
    layer1.gif (1,000 BCE, Zhou Dynasty)
    layer2.gif (350 BCE, Warring States, 7 states listed)
    layer3.gif (350 BCE, Warring States, a different 7 listed)
    layer4.gif (210 BCE, Qin Dynasty)
    layer5.gif (100 BCE, Han Dynasty)
    layer6.gif (262, Three Kingdoms, Wei/Shu/Wu)
    layer7.gif (376,Former Qin, Eastern Jin Dynasty)
    layer8.gif (560, Chen,N.Zhou,N.Qi,W.Liang)
    layer9.gif (581, Sui Dynasty)
    layer10.gif (700,Tang Dynasty)
    layer11.gif (923, Wu,Min,Chu,F.Shu,L.Liang,Wuyue,S.Han,Jingnan)
    layer12.gif (1141, Jin, Song, and XiXia Dynasties)
    layer13.gif (1294, Yuan Dynasty)
    layer14.gif (1410, Ming Dynasty)
    layer15.gif (1892, Qing Dynasty)
    layer16.gif (Present, PRC, ROC)

    I then organized these 16 as one image of four rows of four:
    $ convert layer1.gif layer2.gif layer3.gif layer4.gif +append row1.gif
    $ convert layer5.gif layer6.gif layer7.gif layer8.gif +append row2.gif
    $ convert layer9.gif layer10.gif layer11.gif layer12.gif +append row3.gif
    $ convert layer13.gif layer14.gif layer15.gif layer16.gif +append row4.gif
    $ convert row1.gif row2.gif row3.gif row4.gif -append china.gif

    Results here:
    http://www1.picturepush.com/photo/a/12342164/img/12342164.gif

    Now I just have to figure out a way to scale it to fit on an
    8.5x11.5 sheet of (Am) paper.
    Danny D., Mar 5, 2013
    #6
  7. Danny D.

    jimbok Guest

    Re: How to split an animated GIF into separate GIFs on Linux using freeware

    On Tue, 5 Mar 2013 11:06:19 +0000 (UTC), "Danny D."
    <> wrote:


    >At first I couldn't find any menu item to disable viewing
    >for all layers, or even for any layer- but then I realized
    >that DELETING the layer worked - so this is what I did:


    Next time try Irfanview.
    Load gif into Irfanview, Select 'Options/Extract all frames.'
    All frames of the animated gif will automatically be extracted into a
    folder of your choice.


    --
    jimbok
    jimbok, Mar 5, 2013
    #7
  8. Re: How to split an animated GIF into separate GIFs on Linux using freeware

    On Tue, 5 Mar 2013 11:06:19 +0000 (UTC), Danny D. wrote:

    <Many steps using Gimp snipped>
    > I then organized these 16 as one image of four rows of four:
    > $ convert layer1.gif layer2.gif layer3.gif layer4.gif +append row1.gif


    If you use the convert command line, anyway, you could have used it
    from the beginning. Since it probably is the convert from ImageMagick,
    you could have just used:

    convert Territories_of_Dynasties_in_China.gif -coalesce Frames%02d.gif

    Please note the -coalesce option in addition to the suggestion I
    posted yesterday. It is necessary because of the dispose settings
    of the source *.gif.

    And if you have convert, then you probably also have montage, which
    lets you assemble the extracted frames:

    montage Frames*.gif -geometry +4+4 -page Letter LetterSheet.pdf

    Output can be any valid format; but since you want Letter output,
    *.pdf seemed appropriate...

    HTH.
    BeAr
    --
    ===========================================================================
    = What do you mean with: "Perfection is always an illusion"? =
    ===============================================================--(Oops!)===
    B. R. 'BeAr' Ederson, Mar 5, 2013
    #8
  9. Danny D.

    Danny D. Guest

    On Tue, 05 Mar 2013 22:08:17 +0100 B. R. 'BeAr' Ederson wrote:
    > it probably is the convert from ImageMagick,


    It is.

    > convert Territories_of_Dynasties_in_China.gif -coalesce Frames%02d.gif


    Wow. That was muuuuuch easier!

    Running the "-coalesce" option created:
    Frames00.gif
    Frames01.gif
    ...
    Frames15.gif

    > note the -coalesce option in addition to the suggestion I
    > posted yesterday.
    > gm convert Territories_of_Dynasties_in_China.gif Frames%02d.gif


    I couldn't get the suggestion yesterday to work because I do
    not have a "gm" command; but I didn't want to make a fuss about
    it because you were helping me (so I didn't say anything about it).

    > montage Frames*.gif -geometry +4+4 -page Letter LetterSheet.pdf


    Wow. That even put the images of China's history in the right order!

    Had I known this morning how simple it was (with convert & montage),
    I would not have used The Gimp manually. Thanks for helping me.
    I hope the record helps others who search for how to decompose an
    animated GIF to make a montage mosaic of the assorted images!

    Thanks!
    Danny D., Mar 6, 2013
    #9
  10. Re: How to split an animated GIF into separate GIFs on Linux using freeware

    On Wed, 6 Mar 2013 02:41:34 +0000 (UTC), Danny D. wrote:

    [ImageMagick Solution]
    > I couldn't get the suggestion yesterday to work because I do
    > not have a "gm" command; but I didn't want to make a fuss about
    > it because you were helping me (so I didn't say anything about it).


    I posted shortly before leaving the house in the morning. Therefore
    I hadn't time to describe all command variants (there are several).
    And I hadn't time to test on your original image. (To recognize the
    need for the -coalesce parameter.)

    Since you didn't report any problems, I didn't bother to look into
    that matter, again, until I had seen your manual Gimp solution.

    IMHO, you shouldn't hesitate to ask again (for clarification or
    additional help), whenever sth. doesn't work as promised or as
    necessary.

    The gm command, btw., is for the GraphicsMagick version with
    all-combined commands.

    > Thanks!


    And thanks to you for reporting back! :)

    BeAr (F-Up set to acf.)
    --
    ===========================================================================
    = What do you mean with: "Perfection is always an illusion"? =
    ===============================================================--(Oops!)===
    B. R. 'BeAr' Ederson, Mar 6, 2013
    #10
  11. Danny D.

    philo  Guest

    On 03/03/2013 03:17 PM, Mayayana wrote:
    > Irfan View can do that on Windows.


    On Linux IrfanView runs under Wine with no problems


    I don't know of
    > a Linux alternative, but if you don't find one you
    > like then you might want to install WINE and run Irfan
    > View in that. It's a free program that's very well put
    > together, is only a few MB in size, and has a remarkable
    > amount of functionality as an image viewer and editor.
    >
    > (If I were to vote for the all-around best program in
    > the history of Windows, it would be Irfan View. Not
    > because it's better than any other program, but because
    > for what it does the size, stability, functionality, etc.
    > are all as good or better than any other program I can
    > think of.)
    >



    --
    https://www.createspace.com/3707686
    philo , Mar 9, 2013
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. grayfox64@_______.com

    Stopping Animated Gifs

    grayfox64@_______.com, Nov 19, 2004, in forum: Firefox
    Replies:
    6
    Views:
    5,047
    NoMoreMrNiceGuy
    Nov 20, 2004
  2. Smoker

    Suppressing animated gifs

    Smoker, Aug 31, 2003, in forum: Computer Support
    Replies:
    8
    Views:
    1,287
    Smoker
    Sep 3, 2003
  3. Franklin

    making big GIFs and little GIFs

    Franklin, Feb 7, 2005, in forum: Digital Photography
    Replies:
    6
    Views:
    414
    Bruce
    Feb 9, 2005
  4. Annu Pai
    Replies:
    4
    Views:
    3,555
    Allodoxaphobia
    Nov 23, 2009
  5. James Gagney

    Linux or Windoze freeware to create an animated GIF image

    James Gagney, Sep 6, 2012, in forum: Digital Photography
    Replies:
    28
    Views:
    721
    James Gagney
    Sep 10, 2012
Loading...

Share This Page