ImageTools
FormatFromName
guess image file format from name
Calling Sequence
Parameters
Description
Examples
FormatFromName( file )
file
-
string; name of an image file
The FormatFromName command examines the passed filename and determines the image file format based on the extension. It returns either a member of ImageTools[Formats] or NULL if it was unable to guess.
The parameter file is the name of the image file.
The extensions .jpg, .jpeg, .jpe, and .jeg are recognized as JPEG files.
The extensions .tif, .tiff, and .tff are recognized as TIFF files.
The extensions .bmp and .dib are recognized as BMP files.
The extension .png is recognized as a PNG file.
with⁡ImageTools:
FormatFromName⁡photo.jpeg
JPEG
FormatFromName⁡/tmp/snail.tif
TIFF
FormatFromName⁡music.mp3
See Also
ImageTools[Formats]
ImageTools[Read]
ImageTools[Write]
Download Help Document