gif2anim script throwing a couple of errors

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dumbfck
Posts: 3
Joined: 2012-04-18T12:03:35-07:00
Authentication code: 13

gif2anim script throwing a couple of errors

Post by dumbfck »

Hi,
Sorry, I have searched for a solution to this, but I couldn't find anything and I'm brand new to this so couldn't figure it out myself...
I am using the gif2anim script found here to try to find out the timing information of an animated gif.
I'm running on Windows, so I downloaded CygWin. I saved the script with a .sh extension, ensured the file had Unix line endings, etc.
When I run the script:

Code: Select all

gif2anim mygif.gif
I get a couple of errors:

Code: Select all

Invalid Parameter - -verbose
Invalid Parameter - +repage
If I add the -l command line switch, the +repage error goes away.
I tried removing the -verbose switch from line 55 of the script, and it runs without errors, however the output file is... a little sparse :?

Code: Select all

#
# Animation Sequence File "mygif.gif"
# using a BASENAME of     "mygif"
# Extracted on    2012-04-18 19:52:08
#
I confess I know nothing about bash scripting and I'm also pretty new to IM, but I have genuinely tried to understand the problem and find a solution myself, so any guidance here would be massively appreciated!
Thanks in advance.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: gif2anim script throwing a couple of errors

Post by anthony »

What about the image "mygif.gif" you use it against, can you give al ink to it?

I tried it against the bunny animation and it works fine

Code: Select all

gif2anim -o - im/images/bunny_anim.gif 
#
# Animation Sequence File "im/images/bunny_anim.gif"
# using a BASENAME of     "bunny"
# Extracted on    2012-04-19 08:57:58
#
-loop 0
-page 110x64
-delay 15
-dispose Previous
-page +0+15      BASENAME_001.gif  # 110x41+0+15
-page +29+0      BASENAME_002.gif  # 67x64+29+0
-page +20+0      BASENAME_003.gif  # 85x61+20+0
-page +30+9      BASENAME_004.gif  # 60x54+30+9
and I have 4 frame images bunny_001.gif to bunny_004.gif

Code: Select all

identify bunny_0*.gif
bunny_001.gif GIF 110x41 110x41+0+0 8-bit PseudoClass 256c 1.41KB 0.000u 0:00.000
bunny_002.gif[1] GIF 67x64 67x64+0+0 8-bit PseudoClass 256c 1.45KB 0.000u 0:00.000
bunny_003.gif[2] GIF 85x61 85x61+0+0 8-bit PseudoClass 256c 1.51KB 0.000u 0:00.000
bunny_004.gif[3] GIF 60x54 60x54+0+0 8-bit PseudoClass 256c 1.35KB 0.000u 0:00.000
seems to work fine for me!

What is you IM version?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
dumbfck
Posts: 3
Joined: 2012-04-18T12:03:35-07:00
Authentication code: 13

Re: gif2anim script throwing a couple of errors

Post by dumbfck »

Hi,
I originally wanted to reconstruct an animated gif and wanted an example of how the variable delays worked, but I managed to get it working without analysing the original gif... Just got lucky!
Thanks anyway and sorry for taking up your time.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: gif2anim script throwing a couple of errors

Post by anthony »

For information gathering see IM Examples, Animation Basics...Studying Animations
http://www.imagemagick.org/Usage/anim_basics/#study
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
dumbfck
Posts: 3
Joined: 2012-04-18T12:03:35-07:00
Authentication code: 13

Re: gif2anim script throwing a couple of errors

Post by dumbfck »

Thanks, that was the document I had been referencing :)
Post Reply