GetNumberOfImagesInFile  Method

Description         This method retrieves the number of images in the specified file. This method is available for TIFF, PDF, MO:DCA, GIF, FAX and DCX file formats. The function can also be called for JPEG, PNG, BMP, IOCA, WMF, EMF, PCX, CLP, TGA or CALS files, but the return value will always be 1, because these file formats cannot contain more than one image.

Syntax                 Ret = [BiDib.]GetNumberOfImagesInFile FileName Error

Remarks             Ret                          Long                Number of images, or 0 on error.

                            FileName                String              Path and name of the file.

                            Error                      Long                Retrieves the error code. Available error codes are listed in the LoadImageIntoDIB section.

 

Programming notes  The GetNumberOfImagesInFile method determines the file format based on the file content, not the extension, so any extension can be used for the files.

 

See Also          LoadImageIntoDIB Method, SaveDIBInImageFormat Method