Group Abstract Group Abstract

Message Boards Message Boards

1
|
44.9K Views
|
11 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Creating an animation in GIF file.

Hi all,

I want to create an animation and export it in a gif file. I am able to export animation in .swf etc. formats but when I tried to export it in gif, it gives me a static picture.

gif=Animate[Plot[Sin[a + x], {x, 0, 10}], {a, 0, 10}]

I want to export it in a gif file.

Export["sin.gif",gif] 

gives me a static pidture. but

Export["sin.swf",gif] 

works fine.

Please help me in creating the animation in gif file.

Attachments:
POSTED BY: suvadip mandal
11 Replies
Posted 11 years ago
POSTED BY: Jim Baldwin

actually what I do to make animated gif files from Manipulate is simply use LICEcap (free). I simply run Manipulate as is, and record it from the screen using LICEcap. Hit the stop button when done recording. It saves the recording as animated gif file. Very simple and no code changes is needed in the notebook. It runs on mac also.

POSTED BY: Nasser M. Abbasi

Hi Nasser, hi Jim,

many thanks for your valuable suggestions!

(@Nasser: LICEcap is not running on Linux, but there are similar tools instead, the idea is good nevertheless!)

Henrik

POSTED BY: Henrik Schachner

Hi Nasser,

thank you for your remark! But I tried this long time ago and I found no way to make this work on Linux ... Here I see the only possibility for creating animated gifs in exporting a list of single images.

Henrik

POSTED BY: Henrik Schachner

Hi Suvadip

this is a good question! I would be interested in an answer as well. When I had that problem some time ago, the only solution for me was to adjust the speed of the animation with the help of a regular image manipulation program (e.g. gimp).

Henrik

POSTED BY: Henrik Schachner

Can you tell me how to slow and fast the animation? Because the gif file I have created, is really fast. I want to slow it down.

POSTED BY: suvadip mandal

Thank you so much. This is the exact animated gif file I wanted.

sincerely, Suvadip

POSTED BY: suvadip mandal
Posted 11 years ago

The Table command creates a list of images. When exporting to "sin.gif" Mathematica sees the ".gif" extension and then knows to create an animated gif from that list of images.

gif = Table[Plot[Sin[a + x], {x, 0, 10}], {a, 0, 10}];
Export["sin.gif", gif]
POSTED BY: Jim Baldwin
POSTED BY: suvadip mandal
Posted 11 years ago

One way to do it is replace "Animate" with "Table". (But doing it that way the control for "a" will not appear.)

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard