GetImageFormat

#include "BiDIB.h"

 

FILEFORMAT CALLBACK GetImageFormat(LPTSTR    szFileName)

Description

Reads the file format for the source file.

Parameters

LPTSTR

szFileName

The source file name.

Additional Information

This example shows how to use the dll when loading statically including the header file. Otherwise if the dll is loaded dynamically, for further information read the “About the difference of static and dynamic library loading” section of the manual.

Return values

Returns one of the following values:

         0: Unknown file format,

         1: TIFF file

         2: PCX file

         3: DCX file

         4: GIF file

         5: TGA file

         6: BMP file

         7: WMF file

         8: CLP file

         9: FAX file

         10: ASCII file

         12: CALS file

         13: JPEG file

         14: PNG

         15: EMF file

         18: PDF file

         20: An IO error occurred while reading the file.

         21: IOCA file

         22: MO:DCA file

Programming notes

The GetImageFormat function determines the file format based on the file content, not the extension, so any extension can be used for the files.

Requirements

Header :     Declared in BiDIB.h; include BiDIB.h.

Library :    Use BiDIB.lib.

DLLs :       BiDIB.dll.

Code example

None at present.