Page 1 of 1

Turning a Moho animation into a GIF

Posted: Sat Dec 17, 2005 9:38 pm
by tonym
What's the easiest way of turning a simple Moho animation into a GIF? I'm on a Mac, if that makes any difference.

Thanks!
Tony M

Posted: Sat Dec 17, 2005 10:35 pm
by Rasheed
You can't export to animated GIF directly in Moho.

Instead you export your animation as PNG images and use an image editor to compose an animated GIF. If you have a copy of Photoshop, you can find how to do that in the documentation (I don't have Photoshop).

If you use The Gimp (a free image editor), you can do the following:

Download this script onto your desktop.

Start the Gimp program and activate Preferences in the File menu. Locate Folders ->Scripts in the left pane. Click on the folder item in the right pane; now in the line above it appears the editable location, something like

Code: Select all

/Applications/Gimp.app/Contents/Resources/share/gimp/2.0/scripts
appears (this is where the scripts are located).

Now in your Dock click on the Gimp icon and keep the mouse down until Show in Finder appears. Right-click on the Gimp.app folder in the Finder window and select Show package content. Now the Finder opens a new window with a subfolder Contents in it. Go to consecutive subfolders until you reach the folder path of the scripts folder (see above). Drag the Gimp script you downloaded onto your desktop (reverse-layers.scm) to this folder.

Close and restart Gimp and your reverse layers script can be found through the menu
Script-Fu -> Animators

Now in Moho export your animation as a PNG image sequence into a separate folder. In Gimp, open the first image of this sequence and then load the next images by using Open as layer from the file menu.

The first image in the sequence will now be in layer 1 and will appear as the first in the animated GIF sequence. However the other images are in the wrong order. The last image should be in the top layer and the second image should be in the second layer.

To change this, use the reverse layers script through the menu:
Script-Fu -> Animators -> Reverse

Choose as the new top layer the second layer in the current layer order and leave the new bottom layer as it is. Click on OK to start the script. For many layers this might take some time.

Now save the opened file using the extension .gif instead of .png. Choose Save as animation select your interval time (40 ms is about 24 frames per second) and for Frame disposal where unspecified choose One frame per layer (Replace). Click OK to start the export.

And there is your animated GIF image.

You can tweak this process, by using the color indexing (animated GIF can hold only 256 colors, while PNG can hold millions of colors. If your animation has only 8 colors, the resulting GIF file will be smaller than if you use 256 colors[*].

Of course, your Moho file shouldn't contain too many different colors and keep in mind that anti-aliasing uses colors as well. So, if your Moho file uses 4 colors (including the color "transparant"), you will probably need 8 colors to approximate the original .png image (so twice as much colors as you used in your Moho file).

In Gimp, select the menu
Image -> Mode -> Indexed
or simply type the backslash "\".

Now you can select the number of colors in your animation. Don't forget to select "None" for Color dithering

Another way to reduce the file size is to crop the animation, using the crop tool in the toolbox.
______
[*] Note: actually, you can select only 255 colors, because 1 color is used for the background color.

Posted: Sat Dec 17, 2005 11:50 pm
by Rasheed
I realize what I suggested is not the easiest way. I guess using Photoshop for this is much easier. But if you don't have a copy of Photoshop, The Gimp might be your next best solution. The installation of the script is a pain in the *ss, but you have to do that only once. And then you have the bit of installing X11 from Apple, because The Gimp is a X11 program. It is on your installation disk, but you can also download it from the Apple website.

You could try to use a freeware program called GIFfun, which you can find through the usual download channels (macupdate.com, versiontracker.com), e.g.
http://www.macupdate.com/info.php/id/8869

However this program hasn't been updated by the programmer since 2003 and will probably not be ready for OS X Tiger. So use it at your own risk.

Posted: Sun Dec 18, 2005 11:20 am
by p6r
I didn't find the way to export into an animated gif in Moho !?!
Could you tell me where we can do that, Rasheed ?

Tonym... I explain how I make an animated gif in a NEW extra thread for all the people who are interested... See on Tips and Technique !

Posted: Sun Dec 18, 2005 4:31 pm
by Rasheed
p6r wrote:I didn't find the way to export into an animated gif in Moho !?!
Could you tell me where we can do that, Rasheed ?
Moho can't export GIF files. You have to export your animation as PNG (or JPEG) and compose an animated GIF in another program from the image sequence.

Posted: Sun Dec 18, 2005 6:17 pm
by p6r
Ooops !
I read "can" and not "can't" export... Sorry !

Ok ! An image sequence is the way...

Thanks