GifCreateMultiPageFromFile Method

See Also     Examples     Applies To

Creates a new editable multipage gif image based on an image file.

Syntax

object.GifCreateMultiPageFromFile (sFilePath)

The GifCreateMultiPageFromFile syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
sFilePath Required. String. The path of the file to open. If this parameter is empty, prompts the user to select a file.

Returns

Long.
0: The image could not created. Use the GetStat() function to determine the reason this function failed.
Non-zero: GdPicture Image handle. Handle of the created editable multipage gif image.

Remarks

If success, set the created image as the native GdPicture image.
Supported formats are BMP, DIB, RLE, ICO, EMF, WMF, GIF, ANIMATED GIF, JPEG, JPG, JPE, JFIF, PNG, TIFF, MULTIPAGE TIFF, PNM, PPM, PBM, PFM, PGM, RPPM, RPGM, RPBM, PCX.
Redistributing the optional gdimgplug.dll library you will also be able to read XPM, XBM, WBMP, TGA, SGI, RAW, PICT, Sun RAS, PSD, MNG, Kodak PhotoCD files, KOALA files, JP2, J2K, JNG, JBIG, IFF, HDR, Raw Fax G3, EXR, DDS and Dr. Halo files.

Category

Gif Manipulation

Visual Basic Sample

Draw page number on each page of a multipage gif image


Dim nCpt As Long
Dim nGifImageID As Long
Dim nPageCount As Long

nGifImageID = Object.GifCreateMultiPageFromFile("input.gif")
nPageCount = Object.GifGetPageCount(nGifImageID)

For nCpt = 1 To nPageCount
    Call Object.GifSelectPage(nGifImageID, nCpt)
    Call Object.DrawText("Page " & CStr(nCpt) & " / " & CStr(nPageCount), 50, 50, 10)
Next nCpt

Call Object.GifSaveMultiPageToFile(nGifImageID, "output.gif")
Object.CloseImage (nGifImageID)






© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.