See Also Examples Applies To
Creates a new editable multipage tiff image based on an image file.
Syntax
object.TiffCreateMultiPageFromFile (sFilePath)
The TiffCreateMultiPageFromFile 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 tiff 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
Multipage TIFF Functions
Visual Basic Sample
Draw page number on each page of a multipage tiff image
Dim nCpt As Long
Dim nTiffImageID As Long
Dim nPageCount As Long
nTiffImageID = Object.TiffCreateMultiPageFromFile("input.tif")
nPageCount = Object.TiffGetPageCount(nTiffImageID)
For nCpt = 1 To nPageCount
Call Object.TiffSelectPage(nTiffImageID, nCpt)
Call Object.DrawText("Page " & CStr(nCpt) & " / " & CStr(nPageCount), 50, 50, 10)
Next nCpt
Call Object.TiffSaveMultiPageToFile(nTiffImageID, "output.tif")
Object.CloseImage (nTiffImageID)