Name
hw_IsImage -- check if file is in a supported image format (V5.0)
Synopsis
int ok = hw_IsImage(STRPTR file, int *width, int *height, int *alpha);
Function
This function checks if the specified file is in a supported image format and if it is, hw_IsImage() will return its dimensions in pixels as well as a boolean value that indicates whether or not the image uses alpha channel transparency.

hw_IsImage() is the preferred way of checking if a file is in a supported image format as it just scans the file header and is thus very fast.

Use hw_LoadImage() to load the image. See hw_LoadImage for details.

Designer compatibility
Supported since Designer 4.0

Inputs
file
file to check
width
pointer to an int that receives the image's width in pixels on success
height
pointer to an int that receives the image's height in pixels on success
alpha
pointer to an int that receives the image's alpha channel setting on success (either True or False)
Results
ok
True if the file was recognized as an image file, False otherwise

Show TOC