How to Make an Animated GIF

Paint programs, vector editors, 3d modelers, animation editors, etc.
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

How to Make an Animated GIF

#1 Post by rcrsn51 »

This little app is a GUI front-end for some built-in Puppy tools like gifsicle and gifview. Look for it in the Graphic menu.

Update: Gifsicle has lots of options - resize, rotate, flip, etc. Run "gifsicle -h" to see them. MAAG v1.3 has a box where you can type in a list of any options you want to include. Also, see the discussion here about changing colours in your final animated GIF.

Update: I have removed on-the-fly conversion to GIF. Non-GIF images should be first converted with a tool like convert2gif or mtPaint.

Update: In Step 2, you can now drag in a whole folder of GIFs. However, the files must be named in the same sequence as you want them in the animation . You can also add the same file multiple times to the GIF sequence.

Here is a recipe for using MAAG:

1. Click New to start a project. The project folder is /tmp/maagfolder.
2. Select a file by dragging it into the box or using the File Chooser button.
3. Click Add.
4. Repeat Steps 2 and 3 for each file. You can follow your progress by clicking the View button.
5. When all files are added, set the time interval and looping option.
6. Click Make and Test.
7. Copy the animated file MAAG.GIF from the project folder to a permanent location.
8. The files remain in the project folder until you click New again. So you can continue to add more images.

The package also contains a command-line app for converting JPEG/PNG/TIFF files to GIFs. Run it as

Code: Select all

convert2gif file[s]
or

Code: Select all

convert2gif folder
This project needs more testing, particularly with convert2gif. Feedback is welcome.
Attachments
maag-1.6.pet
Updated 2014-07-08
Programs moved to /usr/local/bin
(2.25 KiB) Downloaded 614 times
screenie.png
(23.73 KiB) Downloaded 2370 times
Last edited by rcrsn51 on Wed 09 Jul 2014, 00:45, edited 20 times in total.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#2 Post by Semme »

Well, "test report" wasn't of much help either.

Here's my test2 folder from a shell:

Code: Select all

maag test2
gettext: write error: Broken pipe
sh: line 1: 13735 Terminated              Xdialog --title " " --msgbox "$(gettext 'Working ...')" 0 0
sh: line 5: 13755 Terminated              Xdialog --title " " --msgbox "$(gettext 'Working ...')" 0 0
gettext: write error: Broken pipe
sh: line 1: 13762 Terminated              Xdialog --title " " --msgbox "$(gettext 'Working ...')" 0 0
gettext: write error: Broken pipe
sh: line 1: 13814 Terminated              Xdialog --title " " --msgbox "$(gettext 'Working ...')" 0 0
gifsicle: /tmp/maagfolder/cheer_on.jpg.gif: empty file
gifsicle: /tmp/maagfolder/shot2.jpg.gif: empty file
gifsicle: /tmp/maagfolder/tmbr-ratlr.jpg.gif: empty file
sh: line 1: 14007 Terminated              Xdialog --title " " --msgbox "$(gettext 'Working ...')" 0 0
gifview: '/tmp/maagfolder/MAAG.GIF' doesn't seem to contain a GIF
FRAMEFILE=""
INTERVAL="10"
LOOP="false"
EXIT="Quit"
First time around this loaded the folder through the shell.

Further attempts required manually dragging the folder.

==

Update: Works fine under a live boot.

Something particular to my setup..
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

Thanks for this test report. There are several issues.

1. When you run MAAG from the command line, you cannot include an argument like test2. It is not designed to work that way.

2. Before dealing with maag, we need to address your problems with convert2gif. It won't have the gettexting issues. Please post a test report on convert2gif - what kind of files are you converting? What goes wrong? Attach one of the problem files so I can test it.

3. I ran MAAG on a clean copy of Lupu 528 and did not see any of the gettext errors. I then switched the locale to fr_FR.UTF-8 and saw one error. But the animated GIF was still created properly.

I believe that MAAG has been gettexted correctly. One of the forum localization experts will need to comment on this.

However, I don't think that the gettexting issue should affect how MAAG works. Again, please describe exactly what graphics files you are working with. If you are using a folder of files, package it in a .tar.gz file and send it to me in a PM.
gifsicle: /tmp/maagfolder/cheer_on.jpg.gif: empty file
I'm guessing that the JPG-to-GIF conversion failed so no animated GIF was created. Please send me this file.

If this is the problem, try converting the JPEGs with another tool like mtPaint. Then load those GIFs into MAAG.
Last edited by rcrsn51 on Tue 10 Jun 2014, 19:28, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

Version 1.2 is posted above

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#5 Post by Semme »

Here we go.. the cali shot's unmodified from my camera and converseen's from PupSnap.

http://www.datafilehost.com/d/1146933f

Local's en_US English. No problems with existing gifs or MAAG animations.

I'll add the jpgs had to first be indexed by mtPaint before the gif save became available.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#6 Post by rcrsn51 »

OK. Using Lupu 528, I installed MAAG v1.3.

I unpacked the tarball and ran

Code: Select all

convert2gif  maag-test_semme
This correctly converted the two JPEGs to GIFs.

I ran MAAG, started a project and added the maag-test_semme folder.

I set the TIme Interval at 100 with Looping.

I made an animated GIF. It ran correctly, except that the frames have different sizes.

I did not need to switch the JPEGs to indexed with mtPaint, probably because convert2gif did it for me.

I would still like to get copies of the original three files that failed - cheer_on.jpg, etc.

Thanks for testing.

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#7 Post by Puppyt »

Thanks rcrsn51 - worked straight OOTB in upup Precise 3.8.3. Cheers!
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#8 Post by rcrsn51 »

Puppyt wrote:Thanks rcrsn51 - worked straight OOTB in upup Precise 3.8.3.
It would help me if you provided some details. What type of files did you start with? GIFs, JPGs, PNGs?

How did you convert them to GIF? This would appear to be the key issue in getting gifsicle/MAAG to work.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#9 Post by Semme »

Rcrsn51, thanks for your time.

It's no deal-breaker that convert2gif doesn't work on my setup. That MAAG does should be enough.

Though if I had to guess, I'd say the hold-up has to do with my gettext install.

ImageMagick >> mogrify -path ~/images -format gif *.jp*g

No such issue.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#10 Post by rcrsn51 »

Are you saying that convert2gif cannot convert your two JPEGs to GIFs? I checked again in Lupu 528 and it worked for me. From a terminal run

Code: Select all

which convert2gif
which jpegtopnm
which ppmdither
which ppmtogif
Note that convert2gif does NOT work with wildcards. You either select a single file or a folder.

Or are you saying that they converted OK, but didn't work in MAAG?

And are you saying that if you converted the files with ImageMagick, they worked OK in MAAG?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#11 Post by Semme »

Correct, no conversion.

Your convert2gif resides where you intended >> /root/my-applications/bin.

The rest are netpbm's default location >> /usr/bin.

Since the md5s were different, I renamed mine to use those in ~/.

No wildcards and no change.

Regardless the conversion handler, MAAG itself works as expected.

Now unless someone else has a problem, R-E-L-A-X.. no biggie.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#12 Post by rcrsn51 »

Semme wrote:The rest are netpbm's default location >> /usr/bin.
I didn't realize how many Puppies already have ppmdither and ppmtogif, so there is no need for me to include them in the PET. Version 1.4 above has removed them.

If you tried to run convert2gif in Lupu with the versions of ppmdither and ppmtogif in /root/my-applications/bin, it would definitely fail - they are not compatible.

But it should work fine with the Lupu versions in /usr/bin. It does for me.

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#13 Post by Puppyt »

rcrsn51 wrote:
Puppyt wrote:Thanks rcrsn51 - worked straight OOTB in upup Precise 3.8.3.
It would help me if you provided some details. What type of files did you start with? GIFs, JPGs, PNGs?

How did you convert them to GIF? This would appear to be the key issue in getting gifsicle/MAAG to work.
Hi again - I just followed the directions on the tin for a quick test: starting a 'new' project, dragging random jpgs into the dialogue and 'add'ing after each. I particularly liked the fact that the framerate could be adjusted 'on the fly' as it were - selecting 'make' and 'test' (via viewnoir) showed the immediate changes, reflected in the MAAG temp GIF file. I haven't tested it further than that I'm afraid.
HTH?
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#14 Post by charlie6 »

Hi rcrsn51,
again, thanks for this funny apps !
got a quick try ...works OOTB :D

and got a look to the detailed gifsicle options and some examples here:
http://manpages.ubuntu.com/manpages/rar ... ontenttoc7
as also here (french translation)
http://www.traduction.cc/traduction/Man ... le-12.html

Just this about gifsicle: getting a quick console trial with setting background color to "#0000FF" as in the example returned an error message:

Code: Select all

sh-3.00# gifsicle -B "#0000FF" <i16.gif >out.GIF
gifsicle: background color not in colormap
sh-3.00# 
Any idea or experience about "not in colormap"? ... but this is of course irrelevant to the content of the current thread.

cheers, charlie
Attachments
MAAG.GIF
(7.32 KiB) Downloaded 1863 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#15 Post by rcrsn51 »

@charlie6:

The -B argument wants an index number, not an RGB value.

Run:
gifsicle --cinfo xxx.gif
This will show you the color table, or colormap. Your MAAG.GIF example has two entries:

Code: Select all

0: #FFFFFF (white)
1: #000000 (black)
The first number on each line is the index and the second is the RGB colour.

Suppose you want to change the background from white to red. Use

Code: Select all

gifsicle --change-color 0 "#FF0000" xxx.gif > new.gif
gifsicle --cinfo new.gif
Note how the color table has changed.

----------------------------

Can you do some testing of convert2gif for me? Version 1.4 also accepts wildcards, so you can do

Code: Select all

convert2gif *.jpg OR
convert2gif xxx.png yyy.tif
Or you can do a whole folder of graphics files at once.

Code: Select all

convert2gif vacation_folder
You could probably modify it to also do BMPs :wink:

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#16 Post by don570 »

I had problems making an animation with maag 1.2 when the
gifs had transparency. It worked when there was no transparency.

I had no problems with transparency when I CD'd to folder containing the gifs
and used the command ..

Code: Select all

gifsicle --colors 256 -w -O2 -D 2 -l --transparent 000000  --careful -d 50 *.gif -o /root/transparent.gif

See image.
I will test version 1.4 now.

P.S. I have a suggestion ----> A warning message when the user
clicks on 'Add' button and there is no path in field.
Attachments
transparent.gif
animation with two transparent gifs
(687 Bytes) Downloaded 465 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#17 Post by rcrsn51 »

Version 1.4 will let you insert those options.
there is no path in field.
How did that happen? Did you just type in "*.gif"?

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#18 Post by don570 »

No . Just too eager to start the project so I left the field open.
_____________________________________________

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#19 Post by rcrsn51 »

OK. It's worth putting an error check on that.

I messed around with transparency.

1. I started with two non-transparent frames.
2. I ran MAAG with the "-t 0" option
3. When I tested it in gifview, it had a black background.
4. When I checked it in Viewnior, it had a transparent background.
5. When I ran "gifsicle --cinfo", it claimed to be transparent.

So I think that the problem is with gifview. I tried to find a setting that would make it transparent, but failed.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#20 Post by don570 »

Another suggestion:

Most Puppies have a default image viewer. The name is stored
in a file somewhere.

I think the file name is defaultimageviewer or something like that.

You could launch the maag.gif with that default image viewer
automatically.

That way you would avoid using gifviewer.
_____________________________________________

Post Reply