Used to find out whether a file found on disk or a file contained in a buffer corresponds to an image format recognized by WINDEV, WEBDEV or WINDEV Mobile.
IF fIsImage(MyBuffer) = True THEN
Info("The variable corresponds to an image.")
END
Syntax
Examining an external file Hide the details
<Result> = fIsImage(<File name and path>)
<Result>: Boolean
- True if the file is an image that can be loaded by WINDEV, WEBDEV or WINDEV Mobile,
- False otherwise.
<File name and path>: Ansi or Unicode character string
Name and full (or relative) path of the file to identify. A UNC path can be used.
Analyzing a Buffer variable Hide the details
<Result> = fIsImage(<Variable name>)
<Result>: Boolean
- True if the buffer corresponds to an image,
- False otherwise.
<Variable name>: Buffer or Binary Memo variable
Name of the Buffer or Binary Memo variable containing the image to be analyzed.
Remarks
fIsImage can be quite slow because it tries to load the image. To quickly check whether a file is an image, you also have the ability to check the file extension directly.