OTHER >> HOW TO CREATE AN ANIMATED .GIF WITH IMAGEMAGICK
In Thread ID:221884, the question asked was 'is the creation of an animated .gif within the scope of GdiPlus?'
Cesar's comment was 'the version of GdiPlus.dll that VFP uses does not not have functions to create animated GIFs'.
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
, 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.
oIM = CREATEOBJECT([ImageMagickObject.MagickImage.1])
lcFile1 = [C:\pictures\expanded\picture 043.png] && Fully qualified path\filename
lcFile2 = [C:\pictures\expanded\picture 044.png]
lcFile3 = [C:\pictures\expanded\picture 045.png]
lcDelay = [-delay] && Required otherwise no delay
lnDelay =  && Change delay value to suit
lcAniGif = ADDBS(SYS(5); && Required output filename
+ SYS(2003)) ; && with fully qualified path
oIM = .NULL.
@ 3/27/2010 1:02:38 PM
Enter the code shown: