Unit iexBitmaps
IsKnownFormat
Declaration
function IsKnownFormat(const FileName : WideString; bIncludeVideoFiles : Boolean = False) : boolean;
Description
Returns true if the specified filename is a supported file format.
By default, this only includes image formats. Set bIncludeVideoFiles to true to include AVI, MPEG and WMV
Note: This method only checks that file extension is recognized (e.g. .JPEG of image.jpeg). To examine the content of the image to determine if it is readable use FindFileFormat
See also: IsKnownSaveFormat
Example
If IsKnownFormat('C:\test.fax') then
ShowMessage('ok, I can load it');
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development