INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Graphics

How can I create an animated .gif using ImageMagick by ChrisRChamberlain
Posted: 23 Mar 09 (Edited 23 Mar 09)

Until such time as such functionality exists with GdiPlus, the following alternative methodology does provide a way to allow a user or developer to programatically create an animated .gif.

Download and install ImageMagick from http://www.imagemagick.org/script/index.php, making sure the version selected contains the ImageMagickObject.dll. The object will be registered during the installation process.

You will need to study the ImageMagick documentation in depth to fully understand how it works.

The barebones code that follows will create an animated gif.

Note there is no need to use "" with filenames containing spaces.

CODE

oIM = CREATEOBJECT([ImageMagickObject.MagickImage.1])

lcFile1 = [C:\pictures\expanded\picture 043.png]
&& Fully qualified filename
lcFile2 = [C:\pictures\expanded\picture 044.png]
lcFile3 = [C:\pictures\expanded\picture 045.png]
lcDelay = [-delay]
&& Required otherwise no delay
lnDelay = [300]
&& Change delay value to suit
lcAniGif = ADDBS(SYS(5);
&& Required output filename
    + SYS(2003));
&& with fully qualified path    
    + [output\output.gif]

oIM.Convert(    ;
    lcFile1    ,;
    lcFile2    ,;
    lcFile3    ,;
    lcDelay    ,;
    lnDelay    ,;    
    lcAniGif)

oIM = .NULL.
RELEASE oIM

Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close