Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 00:12
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
How to Make an Animated GIF
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Author Message
rcrsn51


Joined: 05 Sep 2006
Posts: 9203
Location: Stratford, Ontario

PostPosted: Mon 09 Jun 2014, 11:54    Post_subject:  How to Make an Animated GIF  

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:
convert2gif file[s]
or
Code:
convert2gif folder

This project needs more testing, particularly with convert2gif. Feedback is welcome.
maag-1.6.pet
Description  Updated 2014-07-08
Programs moved to /usr/local/bin
pet

 Download 
Filename  maag-1.6.pet 
Filesize  2.25 KB 
Downloaded  77 Time(s) 
screenie.png
 Description   
 Filesize   23.73 KB
 Viewed   1046 Time(s)

screenie.png


Edited_times_total
Back to top
View user's profile Send_private_message 
Semme

Joined: 07 Aug 2011
Posts: 3972
Location: World_Hub

PostPosted: Tue 10 Jun 2014, 08:32    Post_subject:  

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

Here's my test2 folder from a shell:
Code:
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..

_________________
>>>Punctuation Crash Course<<<
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9203
Location: Stratford, Ontario

PostPosted: Tue 10 Jun 2014, 09:08    Post_subject:  

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.

Quote:
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.

Edited_time_total
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9203
Location: Stratford, Ontario

PostPosted: Tue 10 Jun 2014, 11:43    Post_subject:  

Version 1.2 is posted above
Back to top
View user's profile Send_private_message 
Semme

Joined: 07 Aug 2011
Posts: 3972
Location: World_Hub

PostPosted: Tue 10 Jun 2014, 18:24    Post_subject:  

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.

_________________
>>>Punctuation Crash Course<<<
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9203
Location: Stratford, Ontario

PostPosted: Tue 10 Jun 2014, 18:46    Post_subject:  

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

I unpacked the tarball and ran
Code:
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.
Back to top
View user's profile Send_private_message 
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Tue 10 Jun 2014, 21:54    Post_subject:  

Thanks rcrsn51 - worked straight OOTB in upup Precise 3.8.3. Cheers!
_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send_private_message Visit_website 
rcrsn51


Joined: 05 Sep 2006
Posts: 9203
Location: Stratford, Ontario

PostPosted: Tue 10 Jun 2014, 22:14    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Semme

Joined: 07 Aug 2011
Posts: 3972
Location: World_Hub

PostPosted: Wed 11 Jun 2014, 07:02    Post_subject:  

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.

_________________
>>>Punctuation Crash Course<<<
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9203
Location: Stratford, Ontario

PostPosted: Wed 11 Jun 2014, 07:39    Post_subject:  

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:
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?
Back to top
View user's profile Send_private_message 
Semme

Joined: 07 Aug 2011
Posts: 3972
Location: World_Hub

PostPosted: Wed 11 Jun 2014, 11:37    Post_subject:  

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.

_________________
>>>Punctuation Crash Course<<<
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9203
Location: Stratford, Ontario

PostPosted: Wed 11 Jun 2014, 13:28    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Wed 11 Jun 2014, 19:29    Post_subject:  

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?

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send_private_message Visit_website 
charlie6


Joined: 30 Jun 2008
Posts: 1015
Location: South of Belgium

PostPosted: Wed 11 Jun 2014, 23:34    Post_subject:  

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

and got a look to the detailed gifsicle options and some examples here:
http://manpages.ubuntu.com/manpages/raring/man1/gifsicle.1.html#contenttoc7
as also here (french translation)
http://www.traduction.cc/traduction/Manuel-Gifsicle-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:
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
MAAG.GIF
 Description   
 Filesize   7.32 KB
 Viewed   520 Time(s)

MAAG.GIF

Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9203
Location: Stratford, Ontario

PostPosted: Thu 12 Jun 2014, 06:08    Post_subject:  

@charlie6:

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

Run:
Quote:
gifsicle --cinfo xxx.gif

This will show you the color table, or colormap. Your MAAG.GIF example has two entries:
Code:
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:
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:
convert2gif *.jpg OR
convert2gif xxx.png yyy.tif

Or you can do a whole folder of graphics files at once.
Code:
convert2gif vacation_folder

You could probably modify it to also do BMPs Wink
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1093s ][ Queries: 13 (0.0181s) ][ GZIP on ]