Getting Information About Graphics Files

To obtain information about a graphics file and its contents, use the imfinfo function. You can use imfinfo with any of the formats supported by MATLAB®. Use the imformats function to determine which formats are supported.

The information returned by imfinfo depends on the file format, but it always includes at least the following:

  • Name of the file

  • File format

  • Version number of the file format

  • File modification date

  • File size in bytes

  • Image width in pixels

  • Image height in pixels

  • Number of bits per pixel

  • Image type: truecolor (RGB), grayscale (intensity), or indexed

Was this topic helpful?