Returns the image type in a specified image file.
filetype (optional) On output, a string containing the type of image in the file.
Quiet Suppresses successive levels of error messages, depending on the set value. This keyword accepts the same integer values used with the system variable !Quiet.
Readable If set, checks the file type of the image against the list of supported readable file types.
0 | Indicates that the file does not contain a supported image type. |
0 | Indicates that the file does contain a supported image type. |
NOTE: For a list of supported image types, refer to the Discussion section of the IMAGE_READ function.
If an encoded ID number can be extracted from the file header, and the number matches that of one of the supported image types, return that image type.
If no encoded ID number is detected, return the image type corresponding to the type specified by the Default_Filetype keyword.
If no encoded ID number is detected and the Default_Filetype keyword is not present, try to determine the image type from the filename suffix. The function tries to match the suffix to a list of standard suffixes for supported image file types.
If the image type cannot be determined by the above rules, the function returns an error status.