Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Digital Photography (http://www.velocityreviews.com/forums/f37-digital-photography.html)
-   -   How to split an animated GIF into separate GIFs on Linux usingfreeware (http://www.velocityreviews.com/forums/t958321-how-to-split-an-animated-gif-into-separate-gifs-on-linux-usingfreeware.html)

Danny D. 03-03-2013 08:36 PM

How to split an animated GIF into separate GIFs on Linux usingfreeware
 
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:Te...s_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 03-03-2013 09:17 PM

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." <danny@pleasedontemail.com> wrote in message
news:kh0c90$pa9$1@speranza.aioe.org...
| 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:Te...s_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?



Me 03-03-2013 09:38 PM

Re: How to split an animated GIF into separate GIFs on Linux usingfreeware
 
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:Te...s_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.

Zak Hipp 03-03-2013 11:19 PM

Re: How to split an animated GIF into separate GIFs on Linux usingfreeware
 
On 03/03/2013 22:36, Floyd L. Davidson wrote:
> "Danny D." <danny@pleasedontemail.com> 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:Te...s_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



B. R. 'BeAr' Ederson 03-04-2013 06:14 AM

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:Te...s_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!)===

Danny D. 03-05-2013 11:06 AM

Re: How to split an animated GIF into separate GIFs on Linux usingfreeware
 
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:Te...s_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/...g/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.


jimbok 03-05-2013 03:35 PM

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."
<danny@pleasedontemail.com> 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

B. R. 'BeAr' Ederson 03-05-2013 09:08 PM

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!)===

Danny D. 03-06-2013 02:41 AM

Re: How to split an animated GIF into separate GIFs on Linux usingfreeware
 
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!

B. R. 'BeAr' Ederson 03-06-2013 05:51 AM

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!)===


All times are GMT. The time now is 10:38 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.